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
can't convert a simple LeNet from Pytorch even after removing pooling layers. #811
Comments
It seems to be some unexpected condition. |
Thanks @milhidaka Here is my model definition and training code. I've commented out the webdnn imports and code from this on the top and the bottom. |
Thank you for uploading the code. I will investigate it. |
Some attributes may be omitted and have default value in their specification.
Along with the patch, another is needed in my environment:
The error:
There is another bug which produces incorrect shape variable. I will investigate further. |
fix to latest onnx spec, allowing LeNet conversion in issue #811
Fixed pooling, convolution error in #813 . Please try master branch. ( |
Thanks a bunch. I'll check it out. |
I have a very simple very standard LeNet in pytorch and I can't convert it to webdnn. The pooling layer give an error with dilation attribute. even after removing them and leaving just convolution I get a similar error but this time from attribute transA.
File "", line 1, in
runfile('/Users/alirezagoudarzi/github/Aya-s-Brain/WebDNN_Test/pytorch/train_model.py', wdir='/Users/alirezagoudarzi/github/Aya-s-Brain/WebDNN_Test/pytorch')
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/alirezagoudarzi/github/Aya-s-Brain/WebDNN_Test/pytorch/train_model.py", line 142, in
graph = PyTorchConverter().convert(net, dummy_input)
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/webdnn-1.2.3-py3.6.egg/webdnn/frontend/pytorch/converter.py", line 92, in convert
graph = ONNXConverter().convert(onnx.load(proto_path))
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/webdnn-1.2.3-py3.6.egg/webdnn/frontend/onnx/converter.py", line 94, in convert
self._convert_operator(onnx_op)
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/webdnn-1.2.3-py3.6.egg/webdnn/frontend/onnx/converter.py", line 114, in _convert_operator
super(ONNXConverter, self)._convert_operator(proto)
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/webdnn-1.2.3-py3.6.egg/webdnn/frontend/converter.py", line 117, in _convert_operator
self._handler_map[self.class.name][operator_key](self, operator)
File "/Users/alirezagoudarzi/anaconda/envs/py36/lib/python3.6/site-packages/webdnn-1.2.3-py3.6.egg/webdnn/frontend/onnx/defs/math.py", line 370, in _convert_gemm
y, = Tensordot(None, axes=(A.order.axes[0 if attrs["transA"].i else 1], B.order.axes[1 if attrs["transB"].i else 0]))(A, B)
KeyError: 'transA'
The text was updated successfully, but these errors were encountered: