提交 cab0605c 编写于 作者: T Travis CI

Deploy to GitHub Pages: b8de1401

上级 bf6d3391
...@@ -717,25 +717,19 @@ Duplicable: False Optional: False</li> ...@@ -717,25 +717,19 @@ Duplicable: False Optional: False</li>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">transpose</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt> <code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">transpose</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt>
<dd><p>Transpose Operator.</p> <dd><p>Transpose Operator.</p>
<p>The input tensor will be permuted according to the axis values given. <p>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.</p>
For example:</p> <p>For example: input = numpy.arange(6).reshape((2,3))
<blockquote> the input is:
<div><p>&gt;&gt; input = numpy.arange(6).reshape((2,3))
&gt;&gt; input
array([[0, 1, 2],</p> array([[0, 1, 2],</p>
<blockquote> <blockquote>
<div>[3, 4, 5]])</div></blockquote> <div>[3, 4, 5]])</div></blockquote>
<p>&gt;&gt; axis = [1, 0] <p>given axis is: [1, 0]</p>
&gt;&gt; output = input.transpose(axis) <p>output = input.transpose(axis)
&gt;&gt; output then the output is:
array([[0, 3],</p> array([[0, 3],</p>
<blockquote> <blockquote>
<div><dl class="docutils"> <div>[1, 4],
<dt>[1, 4],</dt> [2, 5]])</div></blockquote>
<dd>[2, 5]])</dd>
</dl>
</div></blockquote>
</div></blockquote>
<p>So, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1}, <p>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)</p> the output tensor shape will be (N, H, W, C)</p>
<table class="docutils field-list" frame="void" rules="none"> <table class="docutils field-list" frame="void" rules="none">
......
...@@ -2170,7 +2170,7 @@ ...@@ -2170,7 +2170,7 @@
} ] } ]
},{ },{
"type" : "unpool", "type" : "unpool",
"comment" : "\n\"Input shape: $(N, C_{in}, H_{in}, W_{in})$, \nOutput shape: $(N, C_{out}, H_{out}, W_{out})$\nWhere\n$$\nH_{out} = (H_{in}−1) * strides[0] − 2 * paddings[0] + ksize[0] \\\\\nW_{out} = (W_{in}−1) * strides[1] − 2 * paddings[1] + ksize[1]\n$$\nPaper: http://www.matthewzeiler.com/wp-content/uploads/2017/07/iccv2011.pdf\n", "comment" : "\nInput shape is: $(N, C_{in}, H_{in}, W_{in})$, Output shape is:\n$(N, C_{out}, H_{out}, W_{out})$, where\n$$\nH_{out} = (H_{in}−1) * strides[0] − 2 * paddings[0] + ksize[0] \\\\\nW_{out} = (W_{in}−1) * strides[1] − 2 * paddings[1] + ksize[1]\n$$\nPaper: http://www.matthewzeiler.com/wp-content/uploads/2017/07/iccv2011.pdf\n",
"inputs" : [ "inputs" : [
{ {
"name" : "X", "name" : "X",
...@@ -2214,7 +2214,7 @@ ...@@ -2214,7 +2214,7 @@
} ] } ]
},{ },{
"type" : "transpose", "type" : "transpose",
"comment" : "\nTranspose Operator.\n\nThe input tensor will be permuted according to the axis values given.\nThe op functions similar to how numpy.transpose works in python.\nFor example:\n >> input = numpy.arange(6).reshape((2,3))\n >> input\n array([[0, 1, 2],\n [3, 4, 5]])\n >> axis = [1, 0]\n >> output = input.transpose(axis)\n >> output\n array([[0, 3],\n [1, 4],\n\t\t[2, 5]])\nSo, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1},\nthe output tensor shape will be (N, H, W, C)\n\n", "comment" : "\nTranspose Operator.\n\nThe input tensor will be permuted according to the axis values given.\nThe op functions is similar to how numpy.transpose works in python.\n\nFor example: input = numpy.arange(6).reshape((2,3))\nthe input is:\narray([[0, 1, 2],\n [3, 4, 5]])\ngiven axis is: [1, 0]\n\noutput = input.transpose(axis)\nthen the output is:\narray([[0, 3],\n [1, 4],\n [2, 5]])\nSo, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1},\nthe output tensor shape will be (N, H, W, C)\n\n",
"inputs" : [ "inputs" : [
{ {
"name" : "X", "name" : "X",
......
...@@ -730,25 +730,19 @@ Duplicable: False Optional: False</li> ...@@ -730,25 +730,19 @@ Duplicable: False Optional: False</li>
<code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">transpose</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt> <code class="descclassname">paddle.v2.fluid.layers.</code><code class="descname">transpose</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span></dt>
<dd><p>Transpose Operator.</p> <dd><p>Transpose Operator.</p>
<p>The input tensor will be permuted according to the axis values given. <p>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.</p>
For example:</p> <p>For example: input = numpy.arange(6).reshape((2,3))
<blockquote> the input is:
<div><p>&gt;&gt; input = numpy.arange(6).reshape((2,3))
&gt;&gt; input
array([[0, 1, 2],</p> array([[0, 1, 2],</p>
<blockquote> <blockquote>
<div>[3, 4, 5]])</div></blockquote> <div>[3, 4, 5]])</div></blockquote>
<p>&gt;&gt; axis = [1, 0] <p>given axis is: [1, 0]</p>
&gt;&gt; output = input.transpose(axis) <p>output = input.transpose(axis)
&gt;&gt; output then the output is:
array([[0, 3],</p> array([[0, 3],</p>
<blockquote> <blockquote>
<div><dl class="docutils"> <div>[1, 4],
<dt>[1, 4],</dt> [2, 5]])</div></blockquote>
<dd>[2, 5]])</dd>
</dl>
</div></blockquote>
</div></blockquote>
<p>So, given a input tensor of shape(N, C, H, W) and the axis is {0, 2, 3, 1}, <p>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)</p> the output tensor shape will be (N, H, W, C)</p>
<table class="docutils field-list" frame="void" rules="none"> <table class="docutils field-list" frame="void" rules="none">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册