You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/19 04:05:57 UTC

[GitHub] [incubator-tvm] Aeroxander opened a new issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling from

Aeroxander opened a new issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling from 
URL: https://github.com/apache/incubator-tvm/issues/4743
 
 
   So I raised this issue but haven't resolved it yet:
   https://discuss.tvm.ai/t/keyerror-input-1-when-compiling-onnx-model/5333
   
   I’m trying to compile my ONNX Pytorch model, the first one works but the second model gives “KeyError: ‘input.1’” as error and I don't know why it gives this error as this is my model:
   
   ![image](https://user-images.githubusercontent.com/11189629/72674622-7e288b80-3a81-11ea-90f1-1038a0817e4b.png)
   
   `
   
       shape_dict_matrix = { ‘input.1’: (1,256,64,64),‘1’: (1,256,64,83) }
       mod_matrix, params_matrix = relay.frontend.from_onnx(matrix_model, shape_dict_matrix)
       with relay.build_config(opt_level=0):
       matrix_executor = relay.build_module.create_executor('graph', mod_matrix, tvm.gpu(0), target)
       dtype = ‘float32’
       matrix_output = matrix_executor.evaluate()(tvm.nd.array(vgg_output.astype(dtype)), **params_matrix).asnumpy()
   `
   
   And here’s the full error:
   
   ```
     File "tvm_from_onnx.py", line 99, in <module>
       matrix_output = matrix_executor.evaluate()(tvm.nd.array(vgg_output.astype(dtype)), **params_matrix).asnumpy()
   
     File "C:\Users\Alexa\AppData\Roaming\Python\Python37\site-packages\tvm-0.6.0-py3.7-win-amd64.egg\tvm\relay\build_module.py", line 333, in _graph_wrapper
       args = self._convert_args(self.mod["main"], args, kwargs)
   
     File "C:\Users\Alexa\AppData\Roaming\Python\Python37\site-packages\tvm-0.6.0-py3.7-win-amd64.egg\tvm\relay\backend\interpreter.py", line 194, in _convert_args
       cargs.append(kwargs[name])
   
   KeyError: 'input.1'
   ```
   
   I can gladly share the entire model

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen commented on issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling ONNX model

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling ONNX model
URL: https://github.com/apache/incubator-tvm/issues/4743#issuecomment-576030588
 
 
   Moved discussion to 
   https://discuss.tvm.ai/t/keyerror-input-1-when-compiling-onnx-model/5333

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] tqchen closed issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling ONNX model

Posted by GitBox <gi...@apache.org>.
tqchen closed issue #4743: [Relay][ONNX]KeyError: 'input.1' when compiling ONNX model
URL: https://github.com/apache/incubator-tvm/issues/4743
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services