I have a .caffemodel file, and I want to use it in my iOS application through Caffe2Kit, but instance init function parameters are 2 .pb files called "initNet" and "predictNet". I tried to use caffe_translator:
python -m caffe2.python.caffe_translator deploy_nodist.prototxt global_model.caffemodel
but I got an error message:
KeyError: 'No translator registered for layer: name: "Slice"\ntype: "Slice"\nbottom: "data_l_ab_mask"\ntop: "data_l"\ntop: "data_ab_mask"\nslice_param {\n slice_point: 1\n axis: 1\n}\n yet.'
Also I tried to convert this .caffemodel file to .mlmodel file with coremltools:
coreml_model = coremltools.converters.caffe.convert('global_model.caffemodel')
But I got this:
Layer 0: Type: 'TransformingFastHDF5Input', Name: 'img'. Output(s): 'img'.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda2/lib/python2.7/site-packages/coremltools/converters/caffe/_caffe_converter.py", line 191, in convert
predicted_feature_name)
File "/anaconda2/lib/python2.7/site-packages/coremltools/converters/caffe/_caffe_converter.py", line 255, in _export
predicted_feature_name)
RuntimeError: Cannot convert caffe layer of type 'TransformingFastHDF5Input'.
How I can integrate this .caffemodel into my iOS application? Or maybe I need to use custom layers for mlmodel? But idk python.