mindspore.ops.MaxPoolWithArgmax
- class mindspore.ops.MaxPoolWithArgmax(kernel_size=1, strides=1, pad_mode='valid', data_format='NCHW')[源代码]
mindspore.ops.MaxPoolWithArgmax
从2.0版本开始已被弃用,并将在未来版本中被移除,建议使用mindspore.ops.MaxPoolWithArgmaxV2
代替。- 支持平台:
Deprecated
样例:
>>> 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.]]]]