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

吃可爱长大的小学妹 提交于 2020-01-05 05:36:08

问题


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


回答1:


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,:,:,:]



来源:https://stackoverflow.com/questions/40122308/forward-from-the-first-of-lmdb-when-using-net-forward-in-pycaffe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!