I have trained a model from caffe in ".caffemodel.h5" format. I want to parse it to extract parameters and feed it to a lasagne model. How can I do it?
Asked
Active
Viewed 179 times
0
-
What is your motivation to do this? Maybe there are other ways of achieving your goal. – eickenberg Nov 18 '15 at 09:31
-
I want to try lasagne for training CNN for cifar10 dataset, but it is taking too much time to train. I have pretrained caffe model, I want to load it to Lasagne and try some operations on it. – Shashank Nov 18 '15 at 09:36
-
OK. Why don't you do these operations in pycaffe? What is the nature of these operations? – eickenberg Nov 18 '15 at 10:10
1 Answers
0
You will have to replicate the architecture of your caffemodel in terms of Lasagne layers first, by hand, or use a script that does this (a script that takes a caffe protobuf and translates it to lasagne exists AFAIK, or should be made if not. In any case it exists in sklearn-theano.)
By hand, you need to open the hf5 file using e.g. pytables
, and then replicate the architecture in Lasagne.

eickenberg
- 14,152
- 1
- 48
- 52