GitHub Viewer
#include "dnn.hpp"
#include
void run_taskflow(MNIST& D, unsigned num_threads) {
static tf::Executor executor(num_threads);
tf::Taskflow taskflow;
std::vector forward_tasks;
std::vector backward_tasks;
std::vector update_tasks;
std::vector shuffle_tasks;
// Number of parallel shuffle
const auto num_storage = num_threads;
const auto num_par_shf = std::min(num_storage, D.epoch);
std::vector mats(num_par_shf, D.images);
std::vector vecs(num_par_shf, D.labels);
// Create task flow graph
const auto iter_num = D.images.rows()/D.batch_size;
for(auto e=0u; e