Skip to content

Commit dbf2050

Browse files
authored
fix read and write tensor array op (#6312)
1 parent a5167ce commit dbf2050

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

paddle/operators/tensor_array_read_write_op.cc

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@ class WriteToArrayOpProtoMaker : public framework::OpProtoAndCheckerMaker {
6060
"(Tensor) the subscript index in tensor array. The number of element "
6161
"should be 1");
6262
AddOutput("Out", "(TensorArray) the tensor array will be written");
63-
AddComment(R"DOC(Write a LoDTensor to a LoDTensor array.
63+
AddComment(R"DOC(
64+
WriteToArray Operator.
6465
65-
Assume T is LoDTensor, i is the subscript of the array, and A is the array. The
66+
This operator writes a LoDTensor to a LoDTensor array.
67+
68+
Assume $T$ is LoDTensor, $i$ is the subscript of the array, and $A$ is the array. The
6669
equation is
6770
68-
A[i] = T
71+
$$A[i] = T$$
72+
6973
)DOC");
7074
}
7175
};
@@ -144,12 +148,16 @@ class ReadFromArrayProtoMaker : public framework::OpProtoAndCheckerMaker {
144148
"(Tensor) the subscript index in tensor array. The number of "
145149
"element should be 1");
146150
AddOutput("Out", "(LoDTensor) the tensor will be read from.");
147-
AddComment(R"DOC(Read a LoDTensor from a LoDTensor Array
151+
AddComment(R"DOC(
152+
ReadFromArray Operator.
148153
149-
Assume T is LoDTensor, i is th e subscript of the array, and A is the array. The
154+
Read a LoDTensor from a LoDTensor Array.
155+
156+
Assume $T$ is LoDTensor, $i$ is the subscript of the array, and $A$ is the array. The
150157
equation is
151158
152-
T = A[i]
159+
$$T = A[i]$$
160+
153161
)DOC");
154162
}
155163
};

0 commit comments

Comments
 (0)