You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
['%498 : Float', '1:102400, 256:400, 20:20, 20:1', ' '] ['%499 : Float', '1:102400, 256:400, 20:20, 20:1', ' '] ['%500 : Double', ' '] Traceback (most recent call last): File "./convertToIR.py", line 202, in <module> _main() File "./convertToIR.py", line 197, in _main ret = _convert(args) File "./convertToIR.py", line 97, in _convert parser = PytorchParser151(model, inputshape[0]) File "/home/user/anaconda3/envs/pytorch/lib/python3.7/site-packages/mmdnn/conversion/pytorch/pytorch_parser.py", line 533, in __init__ self.build_graph(input_shape) File "/home/user/anaconda3/envs/pytorch/lib/python3.7/site-packages/mmdnn/conversion/pytorch/pytorch_parser.py", line 92, in build_graph self.pytorch_graph.build(self.input_shape) File "/home/user/anaconda3/envs/pytorch/lib/python3.7/site-packages/mmdnn/conversion/pytorch/pytorch_graph.py", line 136, in build output_shape = [int(x.replace('!', '').split(':')[0]) for x in output_shape_str[1].split(',')] File "/home/user/anaconda3/envs/pytorch/lib/python3.7/site-packages/mmdnn/conversion/pytorch/pytorch_graph.py", line 136, in <listcomp> output_shape = [int(x.replace('!', '').split(':')[0]) for x in output_shape_str[1].split(',')] ValueError: invalid literal for int() with base 10: ' '
if len(output_shape_str) > 1 改成 if len(output_shape_str) > 2不会报错了,但是网络没有完全转换成功,只转换了第一层,而且提示PyTorch parser has not supported operator [onnx::Constant]. IR network strucuture may lost info.
@Sundrops 好的,我研究一下。怎么避免Constant Op呢,用已知的固定值代替可以吗?PyTorch导出为ONNX时可以选择Constant Folding,但是MMdnn不支持ONNX to IR。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#882