shingjan commented on code in PR #12134:
URL: https://github.com/apache/tvm/pull/12134#discussion_r940680943
##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -1931,16 +1931,20 @@ def pad_common(self, mode, pad_value, inputs,
input_types):
for pad in paddings:
const_paddings.append([])
for p in pad:
- if not isinstance(p, int):
+ if isinstance(p, _expr.Expr):
p = int(_infer_value(p, {}).numpy())
+ elif isinstance(p, float):
+ p = int(p)
+ elif not isinstance(p, int):
Review Comment:
good catch. This used to be a fix for converting any non-`Expr` pad value,
aka float, into int. `_op.nn.pad` should be able to handle both `int` and
`float`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]