Skip to content

Commit d7e7a1d

Browse files
committed
Add using case.
1 parent d04c853 commit d7e7a1d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

paddle/operators/expand_op.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,24 @@ class ExpandOpMaker : public framework::OpProtoAndCheckerMaker {
7272
Expand operator tiles the input by given times number. You should set times
7373
number for each dimension by providing attribute 'expand_times'. The rank of X
7474
should be in [1, 6]. Please notice that size of 'expand_times' must be same with
75-
X's rank.
75+
X's rank. Following is a using case:
76+
77+
Input(X) is a 3-D tensor with shape [2, 3, 1]:
78+
79+
[
80+
[[1], [2], [3]],
81+
[[4], [5], [6]]
82+
]
83+
84+
Attr(expand_times): [1, 2, 2]
85+
86+
Output(Out) is a 3-D tensor with shape [2, 6, 2]:
87+
88+
[
89+
[[1, 1], [2, 2], [3, 3], [1, 1], [2, 2], [3, 3]],
90+
[[4, 4], [5, 5], [6, 6], [4, 4], [5, 5], [6, 6]]
91+
]
92+
7693
)DOC");
7794
}
7895
};

0 commit comments

Comments
 (0)