srkreddy1238 commented on a change in pull request #5695:
URL: https://github.com/apache/incubator-tvm/pull/5695#discussion_r432831890



##########
File path: python/tvm/relay/op/_tensor_grad.py
##########
@@ -472,8 +472,8 @@ def bias_add_grad(orig, grad):
 def dense_grad(orig, grad):
     """Returns [grad' @ weight, data @ grad']"""
     data, weight = orig.args
-    return [collapse_sum_like(transpose(grad) * weight, data),
-            collapse_sum_like(data * transpose(grad), weight)]
+    return [collapse_sum_like(_nn.dense(grad, transpose(weight)), data),

Review comment:
       In above example of data (5, 4) and weight (3, 4) implies a dense with 4 
inputs and yielding 3 outputs each for 5 units. Hence 5 here is the batch when 
we apply to a network.
   
   We very well support units/batches. Can you share details on the error you 
got while units is added as arg ?




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


Reply via email to