From c80df8b12e3bd1d7073e192f458a7530c568fb90 Mon Sep 17 00:00:00 2001 From: chuanqi305 Date: Sat, 29 Jul 2017 08:54:26 -0700 Subject: [PATCH] automatically use the latest snapshot to test --- test.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 46bba01..8cf6a57 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,9 @@ #!/bin/sh +#latest=snapshot/mobilenet_iter_73000.caffemodel +latest=$(ls -t snapshot/*.caffemodel | head -n 1) +if test -z $latest; then + exit 1 +fi ../../build/tools/caffe train -solver="solver_test.prototxt" \ ---weights=snapshot/mobilenet_iter_73000.caffemodel \ +--weights=$latest \ -gpu 0