jiangjiajun commented on a change in pull request #9126:
URL: https://github.com/apache/tvm/pull/9126#discussion_r717379416



##########
File path: python/tvm/relay/frontend/paddlepaddle.py
##########
@@ -191,57 +336,76 @@ def convert_dropout(g, op, block):
     """Operator converter for dropout."""
 
     x = g.get_node(op.input("X")[0])
-    out = _op.copy(x)
+    g.add_node(op.output("Out")[0], x)
+
+
+def convert_dot(g, op, block):
+    """Operator converter for dot."""
+
+    x = g.get_node(op.input("X")[0])
+    y = g.get_node(op.input("Y")[0])
+
+    out = _op.sum(_op.multiply(x, y), axis=[-1], keepdims=True)

Review comment:
       `paddle.dot` : 
https://www.paddlepaddle.org.cn/documentation/docs/en/api/paddle/dot_en.html
   
   It's similar with `torch.dot`, while `torch.dot` only supports 1D tensor.  
   In PaddlePaddle, inputs should be both 1D or 2D tensor. When it is 2d, the 
first dimension of this matrix is the batch dimension.
   
   For clarify, I also put this explanation in code




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to