CircleSpin commented on a change in pull request #9265:
URL: https://github.com/apache/tvm/pull/9265#discussion_r728243879
##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -2697,6 +2697,40 @@ def _impl_v10(cls, inputs, attr, params):
@classmethod
def _impl_v11(cls, inputs, attr, params):
+ scale = inputs[2]
+ scale_shape = infer_shape(scale)
+ if len(inputs) == 4:
+ assert (
+ len(scale_shape) == 0 or scale_shape[0] == 0
+ ), "One of scale or size should be passed, not both."
+ size = inputs[3]
+ else:
+ assert len(scale_shape) != 0, "One of scale or size should be
passed."
+ size = _op.cast(shape_of(inputs[0]),
infer_type(scale).checked_type.dtype) * scale
+ return cls.v11_13_common(inputs, size, attr, params)
+
+ @classmethod
+ def _impl_v13(cls, inputs, attr, params):
+ scale = inputs[2]
+ size = inputs[3]
+ if size is not None:
+ assert scale is None, "One of scale or size should be passed, not
both."
Review comment:
both scale and size are singular (there is only one of them) and adding
an 's' makes them plural. It's only one dog or cat, not dogs or cats :dog:
:cat2: vs :dog: :dog: :dog: :cat2: :cat2: :cat2:
--
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]