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 2021/08/25 15:00:48 UTC
[GitHub] [tvm] mbrookhart commented on a change in pull request #8845: Frontend: add onnx GlobalLpPool op
mbrookhart commented on a change in pull request #8845:
URL: https://github.com/apache/tvm/pull/8845#discussion_r695841609
##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -961,6 +961,18 @@ def _impl_v1(cls, inputs, attr, params):
return _op.power(out, reci_p)
+class GlobalLpPool(OnnxOpConverter):
+ """Operator converter for GlobalLpPool."""
+
+ @classmethod
+ def _impl_v1(cls, inputs, attr, params):
+ in_shape = infer_shape(inputs[0])
+ assert len(in_shape) >= 4, "input shape support NCHW or NCDHW"
+ attr["kernel_shape"] = in_shape[2:]
Review comment:
Nit: I don't think this will work with dynamic shapes, but we shouldn't hit that often and it's hard to support right now. Maybe add a Todo so we can keep an eye on it?
--
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