Tensorflow CoreMLTools转换原因“;读取protobuf规范验证程序错误“;
我一直在构建一个自定义卷积网络,它已保存到.h5文件中。还有一个,我通过弹出最后一层(FC)来应用迁移学习,然后用新数据编译模型。再次以.h5格式保存模型。 当我尝试将此模型转换为mlModel格式时,会出现问题。我得到以下错误:Tensorflow CoreMLTools转换原因“;读取protobuf规范验证程序错误“;,tensorflow,keras,coremltools,transfer-learning,Tensorflow,Keras,Coremltools,Transfer Learning,我一直在构建一个自定义卷积网络,它已保存到.h5文件中。还有一个,我通过弹出最后一层(FC)来应用迁移学习,然后用新数据编译模型。再次以.h5格式保存模型。 当我尝试将此模型转换为mlModel格式时,会出现问题。我得到以下错误: return _MLModelProxy(filename) RuntimeError: Error compiling model: "Error reading protobuf spec. validator error: Layer 'conv2d_2__ac
return _MLModelProxy(filename)
RuntimeError: Error compiling model: "Error reading protobuf spec. validator error: Layer 'conv2d_2__activation__' consumes a layer named 'conv2d_2__activation___output' which is not present in this network."
我正在冻结原始卷积神经网络的层。
我使用的版本有:
- Keras(2.1.6)
- Protobuf(3.6.0)
- Tensorflow(1.8.0)
coreml_model = coremltools.converters.keras.convert(
pathToh5File,
class_labels=['0','1','2','3','4','5','6','7','8','9']
)
我尝试过添加输入名称等等。仍然得到同样的结果
如有任何建议,我将不胜感激。
提前谢谢你