Skip to content

Commit b8de140

Browse files
authored
Merge pull request #6919 from lcy-seso/fix_doc
fix doc.
2 parents 7d8e8d9 + 515e44e commit b8de140

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

paddle/operators/transpose_op.cc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,19 @@ class TransposeOpMaker : public framework::OpProtoAndCheckerMaker {
7070
Transpose Operator.
7171
7272
The input tensor will be permuted according to the axis values given.
73-
The op functions similar to how numpy.transpose works in python.
74-
For example:
75-
>> input = numpy.arange(6).reshape((2,3))
76-
>> input
77-
array([[0, 1, 2],
78-
[3, 4, 5]])
79-
>> axis = [1, 0]
80-
>> output = input.transpose(axis)
81-
>> output
82-
array([[0, 3],
83-
[1, 4],
84-
[2, 5]])
73+
The op functions is similar to how numpy.transpose works in python.
74+
75+
For example: input = numpy.arange(6).reshape((2,3))
76+
the input is:
77+
array([[0, 1, 2],
78+
[3, 4, 5]])
79+
given axis is: [1, 0]
80+
81+
output = input.transpose(axis)
82+
then the output is:
83+
array([[0, 3],
84+
[1, 4],
85+
[2, 5]])
8586
So, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1},
8687
the output tensor shape will be (N, H, W, C)
8788

paddle/operators/unpool_op.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ class Unpool2dOpMaker : public framework::OpProtoAndCheckerMaker {
5353
"(string), unpooling type, can be \"max\" for max-unpooling ")
5454
.InEnum({"max"});
5555
AddComment(R"DOC(
56-
"Input shape: $(N, C_{in}, H_{in}, W_{in})$,
57-
Output shape: $(N, C_{out}, H_{out}, W_{out})$
58-
Where
56+
Input shape is: $(N, C_{in}, H_{in}, W_{in})$, Output shape is:
57+
$(N, C_{out}, H_{out}, W_{out})$, where
5958
$$
6059
H_{out} = (H_{in}−1) * strides[0] − 2 * paddings[0] + ksize[0] \\
6160
W_{out} = (W_{in}−1) * strides[1] − 2 * paddings[1] + ksize[1]

0 commit comments

Comments
 (0)