Moaz Reyad created SINGA-457:
--------------------------------
Summary: Error in ONNX backend.py example
Key: SINGA-457
URL: https://issues.apache.org/jira/browse/SINGA-457
Project: Singa
Issue Type: Bug
Reporter: Moaz Reyad
I tried to run the file [backend.py |
https://github.com/apache/incubator-singa/blob/master/examples/onnx/backend.py]
example. I followed the instructions in the file:
{code:python}
# load and run the onnx model exported from pytorch
#
https://github.com/onnx/tutorials/blob/master/tutorials/PytorchOnnxExport.ipynb
{code}
and executed the file with "use_cpu" option:
{code:bash}
python backend.py --use_cpu
Using CPU
Traceback (most recent call last):
File "backend.py", line 42, in <module>
backend = sonnx.prepare(model, dev)
File
"/home/moaz/singa/venv/local/lib/python2.7/site-packages/singa/sonnx.py", line
254, in prepare
stores_grad=stores_grad,
File
"/home/moaz/singa/venv/local/lib/python2.7/site-packages/singa/tensor.py", line
96, in __init__
copy_from_numpy(self.data, data)
File
"/home/moaz/singa/venv/local/lib/python2.7/site-packages/singa/tensor.py", line
1522, in copy_from_numpy
'tensor shape should be the same'
AssertionError: tensor shape should be the same
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)