我训练了一个ANN模型,并将其保存为.h5文件。然后我将模型转换为张量流模型并得到'savedmodel.pb'
和'variables'
文件夹。 然后,我使用模型优化器 openvino 使用以下方法生成 IR 文件:
python3 mo_tf.py --input_model saved_model.pb
但是我收到以下错误:
[ FRAMEWORK ERROR ] Error parsing message
TensorFlow cannot read the model file: "/home/user/Downloads/OpenVino/dldt-2019/model-optimizer/saved_model.pb" is incorrect TensorFlow model file
openVINO
首先可以用来转换ANN
模型吗?
不幸的是,OpenVINO 不支持 Keras 模型格式。
我猜你从模型优化器那里得到了一个错误,因为你的模型没有冻结。
有很多脚本可以用来将Keras模型转换为冻结的Tensorflow图。例如,我可以推荐这个。
希望它会有所帮助。