chainer.functions.average_pooling_nd¶
-
chainer.functions.average_pooling_nd(x, ksize, stride=None, pad=0, pad_value=0)[source]¶ N-dimensionally spatial average pooling function.
Warning
This feature is experimental. The interface can change in the future.
This function provides a N-dimensionally generalized version of
average_pooling_2d(). This acts similarly toconvolution_nd(), but it computes the average of input spatial patch for each channel without any parameter instead of computing the inner products.- Parameters
x (Variable) – Input variable.
ksize (int or tuple of ints) – Size of pooling window.
ksize=kandksize=(k, k, ..., k)are equivalent.stride (int or tuple of ints or None) – Stride of pooling applications.
stride=sandstride=(s, s, ..., s)are equivalent. IfNoneis specified, then it uses same stride as the pooling window size.pad (int or tuple of ints) – Spatial padding width for the input array.
pad=pandpad=(p, p, ..., p)are equivalent.pad_value (0 or None) – Value to fill the padded region when calculating average. If
Noneis specified, such region is ignored. The default value is0, therefore the averages are biased towards zero.
- Returns
Output variable.
- Return type
Note
This function currently does not support
cover_allmode asmax_pooling_nd(). Average pooling runs in non-cover-all mode.