Closed Igoslow closed 3 years ago
when i change the load model way, i find a bug in onnxmltools.convert_keras code as follows:
import onnxmltools from keras.models import load_model import kashgari input_keras_model = 'E:\KG\kashgari/train\gonghang_2020_12_10'
Change this path to the output name and path for the ONNX model output_onnx_model = 'kashgari_model.onnx'
Load your Keras model loaded_model = kashgari.utils.load_model(input_keras_model)
onnx_model = onnxmltools.convert_keras(loaded_model.tf_model)
Save as protobuf onnxmltools.utils.save_model(onnx_model, output_onnx_model)
This is a bug as follows:
Traceback (most recent call last):
File "E:/KG/kashgari/test_kashgari_onnx.py", line 26, in
Process finished with exit code 1
could you help me?
I haven't tried the onnx, Maybe try to convert it on colab, so you can rule out the environment issue first.
Thank you very much! I get it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
You must follow the issue template and provide as much information as possible. otherwise, this issue will be closed. 请按照 issue 模板要求填写信息。如果没有按照 issue 模板填写,将会忽略并关闭这个 issue
Environment