MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / avg_pool3d

Function avg_pool3d

tensorflow/python/ops/nn_ops.py:3770–3805  ·  view source on GitHub ↗

Performs the average pooling on the input. Each entry in `output` is the mean of the corresponding size `ksize` window in `value`. Args: input: A 5-D `Tensor` of shape `[batch, height, width, channels]` and type `float32`, `float64`, `qint8`, `quint8`, or `qint32`. ksize: An in

(input, ksize, strides, padding, data_format="NDHWC", name=None)

Source from the content-addressed store, hash-verified

3768
3769@tf_export("nn.avg_pool3d")
3770def avg_pool3d(input, ksize, strides, padding, data_format="NDHWC", name=None): # pylint: disable=redefined-builtin
3771 """Performs the average pooling on the input.
3772
3773 Each entry in `output` is the mean of the corresponding size `ksize`
3774 window in `value`.
3775
3776 Args:
3777 input: A 5-D `Tensor` of shape `[batch, height, width, channels]` and type
3778 `float32`, `float64`, `qint8`, `quint8`, or `qint32`.
3779 ksize: An int or list of `ints` that has length `1`, `3` or `5`. The size of
3780 the window for each dimension of the input tensor.
3781 strides: An int or list of `ints` that has length `1`, `3` or `5`. The
3782 stride of the sliding window for each dimension of the input tensor.
3783 padding: A string, either `'VALID'` or `'SAME'`. The padding algorithm.
3784 See the "returns" section of `tf.nn.convolution` for details.
3785 data_format: A string. 'NDHWC' and 'NCDHW' are supported.
3786 name: Optional name for the operation.
3787
3788 Returns:
3789 A `Tensor` with the same type as `value`. The average pooled output tensor.
3790 """
3791 with ops.name_scope(name, "AvgPool3D", [input]) as name:
3792 if data_format is None:
3793 data_format = "NDHWC"
3794 channel_index = 1 if data_format.startswith("NC") else 3
3795
3796 ksize = _get_sequence(ksize, 3, channel_index, "ksize")
3797 strides = _get_sequence(strides, 3, channel_index, "strides")
3798
3799 return gen_nn_ops.avg_pool3d(
3800 input,
3801 ksize=ksize,
3802 strides=strides,
3803 padding=padding,
3804 data_format=data_format,
3805 name=name)
3806
3807
3808# pylint: disable=redefined-builtin

Callers

nothing calls this directly

Calls 2

_get_sequenceFunction · 0.70
name_scopeMethod · 0.45

Tested by

no test coverage detected