Different batch size in train and testing

22 views
Skip to first unread message

Nicola Fiorato

unread,
Dec 17, 2017, 11:58:39 AM12/17/17
to Caffe Users
I'm building an application where a need to evaluate one sample at a time during testing meanwhile during training it's convenient to use batches of 50 samples also for speeding the process, I'm using RNN.
So, if I use only RNN layers and I define two different .prototxt - train with batch = 50, test with batch =1 - the testing goes through, although I'm not really sure it's working properly.
Meanwhile if I use full-connected layers between RNN layers and output I get this dimensional error:
F1218 01:16:16.228632 10525 net.cpp:757] Cannot copy param 0 weights from layer 'fc1'; shape mismatch.  Source param shape is 50 2700 (135000); target param shape is 1 2700 (2700). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.

In your opinion, is it a feasible way to do this kind of tests? Do you think that with this method the first example is working properly?
Do you have any ideas to solve the problem for the example with full-connected layers?

In attachments there are the prototxt files of the second example, they only have additional full connected layers between RNN layers and output,  with respect to the first example.

Thank you for your attention.
deep_stack_out_drop_RNN_net.prototxt
online_deep_stack_out_drop_RNN_net.prototxt
Reply all
Reply to author
Forward
0 new messages