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:
[email protected]


With regards,
Apache Git Services

Reply via email to