Open ghost opened 5 years ago
Replace the ['input']
with the input name for your network - like ['input_0']
:
k_model = onnx_to_keras(model, ['input_0'])
Hi, even on adding the input name of the network, it doesn't work. Used this approach: Use input_all = [node.name for node in onnx_model.graph.input], print (input_all) and replace the 'input' from change k_model = onnx_to_keras(onnx_model, ['input']) to the output of print(input_all)
so on trying: keras_model = onnx_to_keras(onnx_model, ['dense_4_input']) # ['dense_4_input'] is the input name Error: ValueError: 'dense_4/Identity:0' is not a valid scope name
Attaching the onnx model for reference (zipped): model_best_onnx.zip
Note: This onnx model was created from a working keras h5 model using keras2onnx library.
File "/home/pat-011/.local/lib/python3.6/site-packages/onnx2keras/converter.py", line 138, in onnx_to_keras raise AttributeError('Current node is not in weights / model inputs / layers.') AttributeError: Current node is not in weights / model inputs / layers.