From aacd94127bcccfd3a04441526caab27253aea163 Mon Sep 17 00:00:00 2001 From: peterzhang2029 Date: Thu, 23 Nov 2017 13:15:37 +0800 Subject: [PATCH] refine bilinear tensor product doc --- paddle/operators/bilinear_tensor_product_op.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/paddle/operators/bilinear_tensor_product_op.cc b/paddle/operators/bilinear_tensor_product_op.cc index c65ba7eb262..487b0001dab 100644 --- a/paddle/operators/bilinear_tensor_product_op.cc +++ b/paddle/operators/bilinear_tensor_product_op.cc @@ -77,11 +77,19 @@ class BilinearTensorProductOpMaker : public framework::OpProtoAndCheckerMaker { AddOutput("Out", "The output of bilinear_tensor_product operator."); AddComment(R"DOC( Bilinear Tensor Product operator. -Given input X and Y, a 3D tensor weight, and bias. Each column of the -output is computed by one slice i = 1, . . . , k of the tensor: - - M = (X W_i) \cdot Y - Out_i = \sum_i {M_i} + Bias_i +Given input X and Y, a 3D tensor Weight and a Bias. Each column of the +Output is computed by one slice i = 1, . . . , k of the tensor: + +$$ +M = (X W_i) * Y \\ +Out_i = \sum_j {M_j} + Bias_i +$$ + +Where $$W_i$$ is the i-th slice of Input(Weight); + $$M_j$$ is the j-th column of $$M$$; + $$Out_i$$ is the i-th column of Output(Out); + $$Bias_i$$ is a column vector, each element of it is equal to + the i-th element of $$Bias$$; )DOC"); } -- GitLab