I'm trying to convert this model: http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/ from caffe to coreml but I get this error : RuntimeError: Unsupported option '2' for the parameter 'shape size' in layer 'conv2_1_prob_reshape' of type 'Reshape' during caffe conversion.
I used coreml_model = coremltools.converters.caffe.convert(('senet50_ft.caffemodel', 'senet50_ft.prototxt')
.
I also tried adding the class labels (They have a csv file with four columns: ClassID, Name, Sample_Num, Flag. I deleted the last two columns because in other tutorials they use only the first two. I tried having all the columns, only the first two and also the original csv file without converting it to txt). All of the above returned the same error. I'm not sure what this error means (I looked into senet50_ft.prototxt that has all the layers to try to locate the error and it looks like this :
layer {
name: "conv2_1_prob_reshape"
type: "Reshape"
bottom: "conv2_1_1x1_up"
top: "conv2_1_prob_reshape"
reshape_param {
shape {
dim: 0
dim: 0
}
}
}
but I don't really understand much of this.
I'm not very experienced in working with these models, any help is appreciated.
The ReshapeLayerParams
in the MLModel spec say that the shape must have 3 or 4 dimensions. Your prototxt is only providing 2 dimensions (inside reshape_param
). That's what is giving this error.