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/09 22:37:36 UTC

[GitHub] [tvm] vinx13 commented on a diff in pull request #12134: [PyTorch] Fix pad_common for float pad_value

vinx13 commented on code in PR #12134:
URL: https://github.com/apache/tvm/pull/12134#discussion_r941678020


##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -1925,16 +1925,25 @@ 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):

Review Comment:
   Oh I realized this is actually the pad width. Is there any use case that it is 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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org