tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [tvm] hzfan commented on a change in pull request #8622: [Fix][Frontend][TOPI] minor bugs
Date Mon, 02 Aug 2021 22:57:39 GMT

hzfan commented on a change in pull request #8622:
URL: https://github.com/apache/tvm/pull/8622#discussion_r681319482



##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -1445,7 +1445,7 @@ def linear(self, inputs, input_types):
         # 0 - input
         # 1 - weight
         bias = inputs[2]
-        mm_out = self.matmul(inputs[:2], input_types[:2])
+        mm_out = self.matmul([inputs[0], _op.transpose(inputs[1], axes=(1, 0))], input_types[:2])

Review comment:
       @masahi  My concern is that `linear` is supposed to support inputs with arbitrary ranks
like 1d, 2d, 3d, 4d.... The different input dimensions are normalized in `self.matmul`. If
`_op.nn.dense` is directly used, the usability of `linear` would be limited to inputs whose
 ranks are 2.




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



Mime
View raw message