Skip to content
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

Fail to convert resnet101 from PyTorch to IR #929

Open
Ivanfangsc opened this issue Oct 1, 2021 · 0 comments
Open

Fail to convert resnet101 from PyTorch to IR #929

Ivanfangsc opened this issue Oct 1, 2021 · 0 comments

Comments

@Ivanfangsc
Copy link

Platform (like ubuntu 16.04/win10): Ubuntu 20.04 and Windows 10

Python version: 3.9.7

Source framework with version (like Tensorflow 1.4.1 with GPU): PyTorch 1.9.1 CPU only

Destination framework with version (like CNTK 2.3 with GPU): IR

Pre-trained model path (webpath or webdisk path): mmdownload -f pytorch -n resnet101

Running scripts: mmtoir -f pytorch -n imagenet_resnet101.pth -d resnet --inputShape 3,224,224

Error reported:

Traceback (most recent call last):
 File "mmdnn/conversion/_script/convertToIR.py", line 202, in <module>
   _main()
 File "mmdnn/conversion/_script/convertToIR.py", line 197, in _main
   ret = _convert(args)
 File "/mmdnn/conversion/_script/convertToIR.py", line 97, in _convert
   parser = PytorchParser151(model, inputshape[0])
 File "mmdnn/conversion/pytorch/pytorch_parser.py", line 533, in __init__
   self.build_graph(input_shape)
 File "mmdnn/conversion/pytorch/pytorch_parser.py", line 92, in build_graph
   self.pytorch_graph.build(self.input_shape)
 File "mmdnn/conversion/pytorch/pytorch_graph.py", line 135, in build
   output_shape = [int(x.replace('!', '')) for x in output_shape_str[1].split(',')]
 File "mmdnn/conversion/pytorch/pytorch_graph.py", line 135, in <listcomp>
   output_shape = [int(x.replace('!', '')) for x in output_shape_str[1].split(',')]
ValueError: invalid literal for int() with base 10: ' strides'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant