Open dchouren opened 7 years ago
Not sure if this is relevant, but I tried to do some basic inspection with h5py and have this:
>>> import h5py
>>> x = h5py.File('models/Keras_model_weights.h5', 'r')
>>> [y for y in x]
['conv1_1', 'conv1_1_zeropadding', 'conv1_2', 'conv1_2_zeropadding', 'conv2_1', 'conv2_1_zeropadding', 'conv2_2', 'conv2_2_zeropadding', 'conv3_1', 'conv3_1_zeropadding', 'conv3_2', 'conv3_2_zeropadding', 'conv3_3', 'conv3_3_zeropadding', 'conv4_1', 'conv4_1_zeropadding', 'conv4_2', 'conv4_2_zeropadding', 'conv4_3', 'conv4_3_zeropadding', 'conv5_1', 'conv5_1_zeropadding', 'conv5_2', 'conv5_2_zeropadding', 'conv5_3', 'conv5_3_zeropadding', 'data', 'drop6', 'drop7', 'fc6', 'fc6_flatten', 'fc7', 'fc8a', 'pool1', 'pool2', 'pool3', 'pool4', 'pool5', 'prob', 'relu1_1', 'relu1_2', 'relu2_1', 'relu2_2', 'relu3_1', 'relu3_2', 'relu3_3', 'relu4_1', 'relu4_2', 'relu4_3', 'relu5_1', 'relu5_2', 'relu5_3', 'relu6', 'relu7']
Hi @dchouren , are you trying to load the model with the original Keras version? Or with this fork?
Have tried both with the same result
@MarcBS So it seems that what's being created is just a weights file. Is that correct? I can create a model, say VGG16, and then use model.load_weights('...') and that works. I would suggest changing the output from 'Finished storing the converted model...' to indicate that this isn't an .h5 model file but rather just the layer weights so there's no confusion.
I used caffe2keras to convert the VGG16-hybrid1365 caffe model to an h5 file. Conversion went fine and I used the caffemodel and prototxt found here: https://github.com/metalbubble/places365.
However, when I try to load_model, I get ValueError: No model found in config file.
Theano and Keras are up to date.
Any idea why the model is not converted properly?
The only other related issue I could find was this, which didn't shed any light. https://github.com/fchollet/deep-learning-models/issues/1
Converted with