当尝试将此链接here中的caffe模型zoo转换为core ml模型时,收到以下错误: RuntimeError:模型应该只有一个输出(概率),可以自动将其分类。
================= Summary of the conversion: ===================================
Detected input(s) and shape(s) (ignoring batch size):
'data' : 3, 227, 227
Network Input name(s): 'data'.
Network Output name(s): 'loss1/SLclassifier', 'loss2/SLclassifier', 'loss3/SLclassifier'.
Traceback (most recent call last):
File "convert.py", line 7, in <module>
class_labels='class_labels.txt')
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: Model should have exactly one output (the probabilities) to automatically make it a classifier.
您可以在所附的屏幕截图中看到我的代码库。
如何解决此错误?