Commit 7839754b authored by Federico Rossi's avatar Federico Rossi

test example for alexnet

parent 8a11e440
......@@ -6,10 +6,15 @@
using ns = std::chrono::nanoseconds;
using ms = std::chrono::milliseconds;
using get_time = std::chrono::steady_clock ;
using namespace tiny_dnn;
int main(int argc, char **argv) {
tiny_dnn::network<tiny_dnn::sequential> net;
tiny_dnn::models::alexnet<227,227,1000> net;
for(int i = 0; i < 50; ++i) {
std::cout << i << "/50" << std::endl;
net.predict(image<tiny_dnn::float_t>(shape3d(227,227,3),image_type::rgb));
}
/*tiny_dnn::network<tiny_dnn::sequential> net;
std::string model_path(argv[1]);
std::string data_path(argv[2]);
......@@ -41,5 +46,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