Dear qcom,
I want to convert FCN cafeemodel to snpe model,but it's fail when i do it.
I check the convert code in snpe_caffe_to_dlc.py:
..........
# Loop through layers
if len(self.spec.layers) == 0:
self.convert_caffe_new(self.spec)
else:
self.convert_caffe_old(self.spec)
..........
Because of my network is described by the layers and have crop layer,
so will run the code :self.convert_caffe_old(self.spec)
But there is no self.add_crop_layer(layer) in the funtion convert_caffe_old
I try to add self.add_crop_layer(layer) in the funtion self.convert_caffe_old(self.spec)
def convert_caffe_old( self, spec ):
......
for layer in spec.layers:
typ = layer.type
self._network_topology.add_layer(layer, str(layer.type))
if typ == layer.CONCAT:
self.add_concat_layer(layer)
....
elif typ == layer.CROP:
self.add_crop_layer(layer)
elif typ == layer.ELTWISE:
self.add_elementwise_layer(layer)
But appear the following error:
Encountered Error: 'V1LayerParameter' object has no attribute 'crop_param'
I check the code /caffe/src/caffe/proto/caffe.proto:
message V1LayerParameter {
repeated string bottom = 2;
repeated string top = 3;
optional string name = 4;
repeated NetStateRule include = 32;
......
optional ExpParameter exp_param = 41;
optional HDF5DataParameter hdf5_data_param = 13;
optional HDF5OutputParameter hdf5_output_param = 14;
optional HingeLossParameter hinge_loss_param = 29;
optional ImageDataParameter image_data_param = 15;
optional InfogainLossParameter infogain_loss_param = 16;
}
There is really no crop_param.
Is there a solution to slove this problem?
Thanks in advance.