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 2022/08/23 17:04:00 UTC
[GitHub] [tvm] AndrewZhaoLuo commented on a diff in pull request #12555: [frontend][onnx]fix pad constant value is none
AndrewZhaoLuo commented on code in PR #12555:
URL: https://github.com/apache/tvm/pull/12555#discussion_r952897732
##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -1403,7 +1403,7 @@ def _impl_v2(cls, inputs, attr, params):
@classmethod
def _impl_v11(cls, inputs, attr, params):
pads = inputs[1]
- if len(inputs) == 3:
+ if len(inputs) == 3 and input[2] is not None:
Review Comment:
Reading the docs https://github.com/onnx/onnx/blob/main/docs/Operators.md#Pad we should also be checking if input[2] is also an empty string or False.
Pythonically we can just do `and input[2]` (though I would add a comment since this handles multiple types)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org