Fix doc of transpose_op

del_some_in_makelist
wanghaoshuang 7 years ago
parent 682c184cb2
commit b6f638f052

@ -72,17 +72,29 @@ 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 is 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:
the input is:
array([[0, 1, 2], .. code-block:: python
[3, 4, 5]])
given axis is: [1, 0] input = numpy.arange(6).reshape((2,3))
output = input.transpose(axis) the input is:
then the output is:
array([[0, 3], array([[0, 1, 2],
[1, 4], [3, 4, 5]])
[2, 5]])
given axis is:
[1, 0]
output = input.transpose(axis)
then the output is:
array([[0, 3],
[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)

Loading…
Cancel
Save