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/12/22 20:52:24 UTC

[GitHub] [tvm] masahi commented on a change in pull request #9792: Redundant batch_flatten removed for 2D input matrix in Dense layer.

masahi commented on a change in pull request #9792:
URL: https://github.com/apache/tvm/pull/9792#discussion_r774172646



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -719,7 +719,8 @@ def _impl_v1(cls, inputs, attr, params):
             inputs[0] = _op.transpose(inputs[0], axes=(1, 0))
         if not transB:
             inputs[1] = _op.transpose(inputs[1], axes=(1, 0))
-        inputs[0] = _op.nn.batch_flatten(inputs[0])
+        if len(infer_type(inputs[0]).checked_type.shape) != 2:

Review comment:
       Please share the result of `infer_type(inputs[0])` with the one at https://github.com/apache/tvm/blob/96395b46c3899a610d5fcfc8a5da3949a9edb605/python/tvm/relay/frontend/onnx.py#L710




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