-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error converting keras model to pytorch #915
Comments
Hello, I solved this problem by using different versions: Python version: 3.6.12 Source framework with version (like Tensorflow 1.4.1 with GPU): Tensorflow 1.15.2 Destination framework with version (like CNTK 2.3 with GPU): Pytorch 0.4.0 But now I am getting this error: During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Platform (like ubuntu 16.04/win10): win10
Python version: 3.8.5
Source framework with version (like Tensorflow 1.4.1 with GPU): Tensorflow 2.3.0 with GPU
Destination framework with version (like CNTK 2.3 with GPU): Pytorch 1.7.1
Pre-trained model path (webpath or webdisk path): https://keras.io/examples/vision/mnist_convnet/
Running scripts: mmconvert -sf keras -iw my_h5_model.h5 -df pytorch -om pytorch_model.pth
Hello, I try to convert a keras model to a pytorch model. The error I get is:
Traceback (most recent call last):
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Nisch\anaconda3\envs\jntorchenv\Scripts\mmconvert.exe_main.py", line 7, in
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\site-packages\mmdnn\conversion_script\convert.py", line 102, in _main
ret = convertToIR._convert(ir_args)
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\site-packages\mmdnn\conversion_script\convertToIR.py", line 46, in _convert
parser = Keras2Parser(model)
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\site-packages\mmdnn\conversion\keras\keras2_parser.py", line 136, in init
self.keras_graph.build()
File "c:\users\nisch\anaconda3\envs\jntorchenv\lib\site-packages\mmdnn\conversion\keras\keras2_graph.py", line 48, in build
for pred in node.inbound_layers:
TypeError: 'InputLayer' object is not iterable
The text was updated successfully, but these errors were encountered: