comaniac commented on a change in pull request #9512:
URL: https://github.com/apache/tvm/pull/9512#discussion_r749699114



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -2639,8 +2639,12 @@ def _impl_v11(cls, inputs, attr, params):
     def _impl_v13(cls, inputs, attr, params):
         scale = inputs[2]
         size = inputs[3]
+        scale_type = infer_type(scale)
+
         if size is not None:
-            assert scale is None, "One of scale or size should be passed, not 
both."
+            scale_shape = scale_type.checked_type.shape
+            is_empty = scale is None or len(scale_shape) == 0 or 
scale_shape[0] == 0

Review comment:
       nit
   ```suggestion
               is_empty = scale is None or not scale_shape or scale_shape[0] == 0
   ```




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


Reply via email to