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)
| 3768 | |
| 3769 | @tf_export("nn.avg_pool3d") |
| 3770 | def 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 |
nothing calls this directly
no test coverage detected