diff --git a/paddle/fluid/operators/reduce_ops/reduce_min_max_op.h b/paddle/fluid/operators/reduce_ops/reduce_min_max_op.h index dfd0c9d74d16be17bc748c78f9253c1a8d908c47..c36b4d7467658b1db79a3e355b30ea6535ea6ad2 100644 --- a/paddle/fluid/operators/reduce_ops/reduce_min_max_op.h +++ b/paddle/fluid/operators/reduce_ops/reduce_min_max_op.h @@ -125,13 +125,14 @@ struct AMaxOrAMinGradFunctor { HANDLE_AXIS_DIM(3, 2); HANDLE_AXIS_DIM(4, 2); HANDLE_AXIS_DIM(4, 3); - HANDLE_AXIS_DIM(5, 2); - HANDLE_AXIS_DIM(5, 3); - HANDLE_AXIS_DIM(5, 4); - HANDLE_AXIS_DIM(6, 2); - HANDLE_AXIS_DIM(6, 3); - HANDLE_AXIS_DIM(6, 4); - HANDLE_AXIS_DIM(6, 5); + // comments for accelerating compiling temporarily. + // HANDLE_AXIS_DIM(5, 2); + // HANDLE_AXIS_DIM(5, 3); + // HANDLE_AXIS_DIM(5, 4); + // HANDLE_AXIS_DIM(6, 2); + // HANDLE_AXIS_DIM(6, 3); + // HANDLE_AXIS_DIM(6, 4); + // HANDLE_AXIS_DIM(6, 5); } }; diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 12335283cd1fb35c6713e44817ce1a5fbb390e9d..5f7e51598cc4373fd28fde92260731f0941dfc05 100755 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -1775,7 +1775,8 @@ def amax(x, axis=None, keepdim=False, name=None): while max propagates gradient to all of them. Args: - x(Tensor): A tensor, the data type is float32, float64, int32, int64. + x(Tensor): A tensor, the data type is float32, float64, int32, int64, + the dimension is no more than 4. axis(int|list|tuple, optional): The axis along which the maximum is computed. If :attr:`None`, compute the maximum over all elements of `x` and return a Tensor with a single element, @@ -1887,7 +1888,8 @@ def amin(x, axis=None, keepdim=False, name=None): while min propagates gradient to all of them. Args: - x(Tensor): A tensor, the data type is float32, float64, int32, int64. + x(Tensor): A tensor, the data type is float32, float64, int32, int64, + the dimension is no more than 4. axis(int|list|tuple, optional): The axis along which the minimum is computed. If :attr:`None`, compute the minimum over all elements of `x` and return a Tensor with a single element,