提交 515e44e5 编写于 作者: Y ying

fix doc.

上级 68f2a962
...@@ -70,18 +70,19 @@ class TransposeOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -70,18 +70,19 @@ class TransposeOpMaker : public framework::OpProtoAndCheckerMaker {
Transpose Operator. Transpose Operator.
The input tensor will be permuted according to the axis values given. The input tensor will be permuted according to the axis values given.
The op functions similar to how numpy.transpose works in python. The op functions is similar to how numpy.transpose works in python.
For example:
>> input = numpy.arange(6).reshape((2,3)) For example: input = numpy.arange(6).reshape((2,3))
>> input the input is:
array([[0, 1, 2], array([[0, 1, 2],
[3, 4, 5]]) [3, 4, 5]])
>> axis = [1, 0] given axis is: [1, 0]
>> output = input.transpose(axis)
>> output output = input.transpose(axis)
array([[0, 3], then the output is:
[1, 4], array([[0, 3],
[2, 5]]) [1, 4],
[2, 5]])
So, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1}, So, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1},
the output tensor shape will be (N, H, W, C) the output tensor shape will be (N, H, W, C)
......
...@@ -53,9 +53,8 @@ class Unpool2dOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -53,9 +53,8 @@ class Unpool2dOpMaker : public framework::OpProtoAndCheckerMaker {
"(string), unpooling type, can be \"max\" for max-unpooling ") "(string), unpooling type, can be \"max\" for max-unpooling ")
.InEnum({"max"}); .InEnum({"max"});
AddComment(R"DOC( AddComment(R"DOC(
"Input shape: $(N, C_{in}, H_{in}, W_{in})$, Input shape is: $(N, C_{in}, H_{in}, W_{in})$, Output shape is:
Output shape: $(N, C_{out}, H_{out}, W_{out})$ $(N, C_{out}, H_{out}, W_{out})$, where
Where
$$ $$
H_{out} = (H_{in}−1) * strides[0] − 2 * paddings[0] + ksize[0] \\ H_{out} = (H_{in}−1) * strides[0] − 2 * paddings[0] + ksize[0] \\
W_{out} = (W_{in}−1) * strides[1] − 2 * paddings[1] + ksize[1] W_{out} = (W_{in}−1) * strides[1] − 2 * paddings[1] + ksize[1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册