mindspore/docs/api/api_python/nn/mindspore.nn.AdaptiveMaxPoo...

26 lines
1.7 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.nn.AdaptiveMaxPool3d
==============================
.. py:class:: mindspore.nn.AdaptiveMaxPool3d(output_size, return_indices=False)
3维自适应最大值池化。
对于任何输入尺寸,输出的大小为 :math:`(D, H, W)` 。输出特征的数量与输入特征的数量相同。
参数:
- **output_size** (Union[int, tuple]) - 表示输出特征图的尺寸输入可以是tuple :math:`(D, H, W)`也可以是一个int值D来表示输出尺寸为 :math:`(D, D, D)`:math:`D` :math:`H`:math:`W` 可以是int型整数或者None其中None表示输出大小与对应的输入的大小相同。
- **return_indices** (bool) - 如果 `return_indices` 为True将会输出最大值对应的索引否则不输出索引。默认为False。
输入:
- **x** (Tensor) - shape为 :math:`(C, D, H, W)`:math:`(NC, D, H, W)` 的Tensor支持的数据类型包括int8、int16、int32、int64、uint8、uint16、uint32、uint64、float16、float32、float64。
输出:
- **y** (Tensor) - Tensor与输入 `x` 的数据类型和维度相同。
- **argmax** (Tensor) - Tensor最大值对应的索引数据类型为int32并与 `y` 的shape相同。仅当 `return_indices` 为True的时候才返回该值。
异常:
- **TypeError** - `x` 不是Tensor。
- **ValueError** - `x` 的维度不是4D或者5D。
- **TypeError** - `x` 的数据类型不是int8、int16、int32、int64、uint8、uint16、uint32、uint64、float16、float32、float64其中之一。
- **ValueError** - `output_size` 不是一个int整数或者shape为(3,)的tuple。