masahi commented on a change in pull request #5132: [Torch] Fix conv2d 
conversion for group conv (group > 1 but != in channels)
URL: https://github.com/apache/incubator-tvm/pull/5132#discussion_r396828898
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -250,7 +250,9 @@ def _impl(inputs, input_types):
         channels = weight_shape[0]
         groups = int(inputs[8])
 
-        if groups > 1:
+        # weight_shape[1] is always in_channels // groups
+        # For depthwise, in_channels == groups
 
 Review comment:
   Added more comments. Also explained why we need reshape for depth wise case.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to