Open nischa564 opened 3 years ago
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: Traceback (most recent call last): File "c:\users\nisch\anaconda3\envs\mmdnne\lib\site-packages\mmdnn\conversion\keras\keras2_parser.py", line 104, in init from keras.applications.mobilenet import relu6 ImportError: cannot import name 'relu6'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\nisch\anaconda3\envs\mmdnne\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\nisch\anaconda3\envs\mmdnne\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Nisch\anaconda3\envs\mmdnne\Scripts\mmconvert.exe__main.py", line 7, in
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