Different testing accuracy in python

119 views
Skip to first unread message

Belhassen Bayar

unread,
Sep 30, 2016, 12:35:58 PM9/30/16
to Caffe Users
I am having a trouble in caffe and I would really appreciate if one could help.
Actually, when I test my trained model in python using this code gives me a lower testing accuracy compared to the testing accuracy that I get using the caffe command line:
./build/tools/caffe test --model=/home/mymodel/train_val_face.prototxt --weights=data/face/snapshots/bvlc_face_iter_50000.caffemodel -gpu 0 -iterations 5000

My lmdb data is a set of grayscale images and I don't subtract the mean or apply any preprocessing to them when I train the network. Also I made sure about the batch size of testing when I test my model with the command line.

I have also tried to extract the "prob" layer using extract_features.bin then classify my images using the argmax in python it gave me the same accuracy that I got with the testing python code.

Any help would be really appreciated!

İlker Kesen

unread,
Sep 30, 2016, 12:41:44 PM9/30/16
to Belhassen Bayar, Caffe Users
Do you use same input with same random seed? Also, how much difference between them?

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/18082cc0-b6c0-4565-bfc3-6b6078f69b32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Belhassen Bayar

unread,
Sep 30, 2016, 12:47:22 PM9/30/16
to Caffe Users, belhass...@gmail.com
Sorry if I misunderstood your question. 
Do you mean same testing data? 
There is no randomness when I test the model. I use the same val_lmdb data to test my binary model "bvlc_face_iter_50000.caffemodel" in python as well as the testing cmd line and I got different results.
Reply all
Reply to author
Forward
0 new messages