Search code examples
deep-learningcaffepycaffelmdb

Forward from the first of lmdb when using net.forward in pycaffe


I am using pycaffe and my train and test data is in LMDB format.

I have created my net like this: net = caffe.Net('train.prototxt', 'c.caffemodel', caffe.TEST)

when you call net.forward, implicitly you walk through the LMDB test database one by one batches. My question is how can I start from the beginning of LMDB and test my network on the first n batches of the test data?

Thanks


Solution

  • not sure it still relevant but you would need to change the data of input layer ,something like this net.params['data'][0].data[...] =net.params['data'][0].data[n,:,:,:]