|
|
@ -2729,15 +2729,17 @@ def img_pool_layer(input,
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
|
|
|
|
w = 1 + \frac{ceil(input\_width + 2 * padding - pool\_size)}{stride} \\\\
|
|
|
|
w & = 1 + \\frac{ceil(input\_width + 2 * padding - pool\_size)}{stride}
|
|
|
|
h = 1 + \frac{ceil(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
h & = 1 + \\frac{ceil(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
- ceil_mode=False:
|
|
|
|
- ceil_mode=False:
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
|
|
|
|
w = 1 + \frac{floor(input\_width + 2 * padding - pool\_size)}{stride} \\\\
|
|
|
|
w & = 1 + \\frac{floor(input\_width + 2 * padding - pool\_size)}{stride}
|
|
|
|
h = 1 + \frac{floor(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
h & = 1 + \\frac{floor(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
The example usage is:
|
|
|
|
The example usage is:
|
|
|
|
|
|
|
|
|
|
|
@ -2870,17 +2872,21 @@ def img_pool3d_layer(input,
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
|
|
|
|
w = 1 + \frac{ceil(input\_width + 2 * padding - pool\_size)}{stride} \\\\
|
|
|
|
w & = 1 + \\frac{ceil(input\_width + 2 * padding - pool\_size)}{stride}
|
|
|
|
h = 1 + \frac{ceil(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y} \\\\
|
|
|
|
|
|
|
|
d = 1 + \frac{ceil(input\_depth + 2 * padding\_z - pool\_size\_z)}{stride\_z}
|
|
|
|
h & = 1 + \\frac{ceil(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d & = 1 + \\frac{ceil(input\_depth + 2 * padding\_z - pool\_size\_z)}{stride\_z}
|
|
|
|
|
|
|
|
|
|
|
|
- ceil_mode=False:
|
|
|
|
- ceil_mode=False:
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
.. math::
|
|
|
|
|
|
|
|
|
|
|
|
w = 1 + \frac{floor(input\_width + 2 * padding - pool\_size)}{stride} \\\\
|
|
|
|
w & = 1 + \\frac{floor(input\_width + 2 * padding - pool\_size)}{stride}
|
|
|
|
h = 1 + \frac{floor(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y} \\\\
|
|
|
|
|
|
|
|
d = 1 + \frac{floor(input\_depth + 2 * padding\_z - pool\_size\_z)}{stride\_z} \\\\
|
|
|
|
h & = 1 + \\frac{floor(input\_height + 2 * padding\_y - pool\_size\_y)}{stride\_y}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
d & = 1 + \\frac{floor(input\_depth + 2 * padding\_z - pool\_size\_z)}{stride\_z}
|
|
|
|
|
|
|
|
|
|
|
|
The example usage is:
|
|
|
|
The example usage is:
|
|
|
|
|
|
|
|
|
|
|
@ -5437,13 +5443,21 @@ def maxout_layer(input, groups, num_channels=None, name=None, layer_attr=None):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. math::
|
|
|
|
.. math::
|
|
|
|
out = \max_k (in[n, k, o_c , s]) \\\\
|
|
|
|
|
|
|
|
out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j} \\\\
|
|
|
|
& out = \max_k (in[n, k, o_c , s])
|
|
|
|
s = \frac{input.size}{ num\_channels} \\\\
|
|
|
|
|
|
|
|
o_{c} =\frac{num\_channels}{groups} \\\\
|
|
|
|
& out_{i * s + j} = \max_k in_{ k * o_{c} * s + i * s + j}
|
|
|
|
0 \le i < o_{c} \\\\
|
|
|
|
|
|
|
|
0 \le j < s \\\\
|
|
|
|
& s = \\frac{input.size}{ num\_channels}
|
|
|
|
0 \le k < groups \\\\
|
|
|
|
|
|
|
|
|
|
|
|
& o_{c} = \\frac{num\_channels}{groups}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& 0 \le i < o_{c}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& 0 \le j < s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& 0 \le k < groups
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The simple usage is:
|
|
|
|
The simple usage is:
|
|
|
|
|
|
|
|
|
|
|
|