chainer.functions.unpooling_2d¶
-
chainer.functions.
unpooling_2d
(x, ksize, stride=None, pad=0, outsize=None, cover_all=True)[source]¶ Inverse operation of pooling for 2d array.
This function acts similarly to
Deconvolution2DFunction
, but it spreads input 2d array’s value without any parameter instead of computing the inner products.- Parameters
x (Variable) – Input variable.
ksize (int or pair of ints) – Size of pooling window.
ksize=k
andksize=(k, k)
are equivalent.stride (int, pair of ints or None) – Stride of pooling applications.
stride=s
andstride=(s, s)
are equivalent. IfNone
is specified, then it uses same stride as the pooling window size.pad (int or pair of ints) – Spatial padding width for the input array.
pad=p
andpad=(p, p)
are equivalent.outsize (None or pair of ints) – Expected output size (height, width) of array after the operation. If
None
, the size (height or width) is estimated from the size of input array in first batch withget_deconv_outsize()
. If outsize is notNone
, the result of outsize applied toget_conv_outsize()
must be equal to the shape of the 2d array in the input batchx
.cover_all (bool) – If
True
, the output size may be smaller than the size ifcover_all
isFalse
. This flag serves to align behavior to the pooling functions which can cover all input locations, seemax_pooling_2d()
andconvolution_2d()
.
- Returns
Output variable.
- Return type