Uploaded image for project: 'Singa'
  1. Singa
  2. SINGA-457

Error in ONNX backend.py example

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None

    Description

      I tried to run the file backend.py example. I followed the instructions in the file:

      
      # load and run the onnx model exported from pytorch
      # https://github.com/onnx/tutorials/blob/master/tutorials/PytorchOnnxExport.ipynb
      
      

      and executed the file with "use_cpu" option:

      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
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            moazreyad Moaz Reyad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: