Commit 36b6f4ad authored by Federico Rossi's avatar Federico Rossi

..

parent 00dc3fe8
......@@ -12,18 +12,18 @@ int main(int argc, char **argv) {
tiny_dnn::network<tiny_dnn::sequential> net;
std::string model_path(argv[1]);
std::string data_path(argv[2]);
int num = atoi(argv[3]);
net.load(model_path); //load pre-trained model
std::vector<tiny_dnn::label_t> vlab;
std::vector<tiny_dnn::vec_t> vimg;
std::vector<unsigned int> times;
parse_binImagenet<32,32,3,uint8_t>(data_path,&vimg,&vlab,-1,1);
net.test(vimg, vlab).print_detail(std::cout);
/*int successes = 0;
int successes = 0;
auto start = get_time::now();
for(unsigned int i = 0; i < 1000; ++i) {
for(unsigned int i = 0; i < num; ++i) {
auto inner_b = get_time::now();
auto res = net.predict(vimg[i]);
auto inner_e = get_time::now();
......@@ -41,5 +41,5 @@ int main(int argc, char **argv) {
make_test_report(vimg,successes,times,std::chrono::duration_cast<ms>(diff).count(),"../../plot/test_perf_");
std::cout << "Accuracy: " << successes << "/" << vimg.size() << "\n";
std::cout << "Time elapsed: " << std::chrono::duration_cast<ms>(diff).count() << "ms\n";
return 0;*/
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment