mindspore.ops.MaxPoolWithArgmax
- class mindspore.ops.MaxPoolWithArgmax(kernel_size=1, strides=1, pad_mode='valid', data_format='NCHW')[source]
mindspore.ops.MaxPoolWithArgmax
is deprecated from version 2.0 and will be removed in a future version, usemindspore.ops.MaxPoolWithArgmaxV2
instead.- Supported Platforms:
Deprecated
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, ops >>> x = Tensor(np.arange(1 * 3 * 3 * 4).reshape((1, 3, 3, 4)), mindspore.float32) >>> maxpool_arg_op = ops.MaxPoolWithArgmax(pad_mode="VALID", kernel_size=2, strides=1) >>> output_tensor, argmax = maxpool_arg_op(x) >>> print(output_tensor) [[[[ 5. 6. 7.] [ 9. 10. 11.]] [[17. 18. 19.] [21. 22. 23.]] [[29. 30. 31.] [33. 34. 35.]]]]