mindspore.ops.AdaptiveMaxPool3D

class mindspore.ops.AdaptiveMaxPool3D[source]

Applies a 3D adaptive max pooling over an input signal composed of several input planes.

Refer to mindspore.ops.adaptive_max_pool3d() for more details.

Supported Platforms:

GPU CPU

Examples

>>> class AdaptiveMaxPool3DNet(nn.Cell):
...     def __init__(self):
...         super(AdaptiveMaxPool3DNet, self).__init__()
...         self.adaptive_max_pool_3d = ops.AdaptiveMaxPool3D()
...     def construct(self, x_, output_size_):
...         return self.adaptive_max_pool_3d(x_, output_size_)
>>> x = np.arange(0,36).reshape((1, 3, 3, 4)).astype(np.float32)
>>> output_size = np.array([1, 1, 2], dtype=np.int32)
>>> net = AdaptiveMaxPool3DNet()
>>> output = net(Tensor(x), Tensor(output_size))
>>> print(output[0].asnumpy())
[[[[33. 35.]]]]
>>> print(output[1].asnumpy())
[[[[33 35]]]]