Skip to content

Commit 1ab1b09

Browse files
Merge pull request #5875 from peterzhang2029/refine_op_doc
Fix latex syntax in bilinear tensor product operator comment.
2 parents 2c471db + 4bdd976 commit 1ab1b09

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

paddle/operators/bilinear_tensor_product_op.cc

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,19 @@ class BilinearTensorProductOpMaker : public framework::OpProtoAndCheckerMaker {
7777
AddOutput("Out", "The output of bilinear_tensor_product operator.");
7878
AddComment(R"DOC(
7979
Bilinear Tensor Product operator.
80-
Given input X and Y, a 3D tensor weight, and bias. Each column of the
81-
output is computed by one slice i = 1, . . . , k of the tensor:
82-
83-
M = (X W_i) \cdot Y
84-
Out_i = \sum_i {M_i} + Bias_i
80+
Given input X and Y, a 3D tensor Weight and a Bias. Each column of the
81+
Output is computed by one slice $i = 1, . . . , k$ of the tensor:
82+
83+
$$
84+
M = (X W_i) * Y \\
85+
Out_i = \sum_j {M_j} + Bias_i
86+
$$
87+
88+
Where $W_i$ is the $i$-th slice of Input(Weight);
89+
$M_j$ is the $j$-th column of $M$;
90+
$Out_i$ is the $i$-th column of Output(Out);
91+
$Bias_i$ is a column vector, each element of it is equal to
92+
the $i$-th element of $Bias$;
8593
8694
)DOC");
8795
}

0 commit comments

Comments
 (0)