jwfromm commented on issue #4521: ONNX importer ModelParams bug
URL: https://github.com/apache/incubator-tvm/issues/4521#issuecomment-565689979
 
 
   Ok so what's happening is Onnx treats the shape of Reshape operators as 
parameters that naturally get added to the dictionary of global parameters 
during conversion. In Relay, however, the output shape of reshape is fixed so 
the parameters aren't needed. Instead of just peeking at the shape and leaving 
it in parameters, we can instead pop them out of the parameter dictionary like 
so (line 466 in onnx.py):
   
   ```
   shape = tuple(params.pop(inputs[1].name_hint).asnumpy())
   ```
   
   If we think this is a bug worth fixing (or if its even technically a bug at 
all) one of us can open a one line fix PR.

----------------------------------------------------------------
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