A wrapper method to spawn a thread to execute Train() method.
| 133 | |
| 134 | /// A wrapper method to spawn a thread to execute Train() method. |
| 135 | std::thread TrainThread(size_t batchsize, int nb_epoch, const Tensor& x, |
| 136 | const Tensor& y, const Tensor& val_x, |
| 137 | const Tensor& val_y) { |
| 138 | return std::thread( |
| 139 | [=]() { Train(batchsize, nb_epoch, x, y, val_x, val_y); }); |
| 140 | } |
| 141 | |
| 142 | /// A wrapper method to spawn a thread to execute Train() method. |
| 143 | std::thread TrainThread(size_t batchsize, int nb_epoch, const Tensor& x, |