sukritshankar / Caffe-LMDBCreation-MultiLabel

Creation of LMDB for training a multi-label loss in Caffe
71 stars 35 forks source link

load weights from a pre-trained Caffe model #5

Open k-eak opened 7 years ago

k-eak commented 7 years ago

Hi,

First of all thank you for your contributions, your code has been very helpful. I've managed to run my model from the scratch.

I was wondering if it is possible to use a pre-trained single label Caffe model for my multi label problem. I've been unsuccessful to make it work and I think it is because of different data layer structures. Do you think is it possible to make it work?

Thank you.

sukritshankar commented 7 years ago

Yes surely !! You will need to initialise with the already learnt params, and then do forward and backward passes using some python code. Specifically see this file - https://github.com/BVLC/caffe/blob/master/python/caffe/pycaffe.py and use functions for getting and setting params and forward and backward passes !! Also https://github.com/BVLC/caffe/blob/master/docs/tutorial/interfaces.md may help !!

k-eak commented 7 years ago

Dear sukritshankar,

Thank you for your prompt response. I think I managed to get it work. However, I am now getting another error:

I0316 10:54:52.287003 21115 layer_factory.hpp:77] Creating layer data I0316 10:54:52.288473 21115 net.cpp:100] Creating Layer data I0316 10:54:52.288525 21115 net.cpp:408] data -> data I0316 10:54:52.288667 21115 data_transformer.cpp:25] Loading mean file from: means/data.binaryproto F0316 10:54:52.293195 21118 db_lmdb.hpp:15] Check failed: mdb_status == 0 (38 vs. 0) Function not implemented

Have you ever encountered such error? I did some search for "Function not implemented" error but couldn't find anything helpful.

Thank you.

Feywell commented 6 years ago

@emirak Hi emirak. Did you fix that error? I encountered the same error? Did you use a HPC as same as me? Can you give me some advices. Thank you!

k-eak commented 6 years ago

@Feywell Hi Feywell, I did not fix that error (I am not familiar with Caffe) but I just switched to Tensorflow which is much more easier to configure.