diff --git a/mindspore/nn/layer/image.py b/mindspore/nn/layer/image.py index 75afd97761..d5d9458b26 100644 --- a/mindspore/nn/layer/image.py +++ b/mindspore/nn/layer/image.py @@ -349,7 +349,7 @@ class PSNR(Cell): Args: max_val (Union[int, float]): The dynamic range of the pixel values (255 for 8-bit grayscale images). - Default: 1.0. + The value must be greater than 0. Default: 1.0. Inputs: - **img1** (Tensor) - The first image batch with format 'NCHW'. It must be the same shape and dtype as img2. diff --git a/mindspore/ops/composite/random_ops.py b/mindspore/ops/composite/random_ops.py index 4a41cb4507..4871e52806 100644 --- a/mindspore/ops/composite/random_ops.py +++ b/mindspore/ops/composite/random_ops.py @@ -247,12 +247,11 @@ def multinomial(inputs, num_sample, replacement=True, seed=0): Args: inputs (Tensor): The input tensor containing probabilities, must be 1 or 2 dimensions, with - float32 data type. + float32 data type. num_sample (int): Number of samples to draw. replacement (bool, optional): Whether to draw with replacement or not, default True. seed (int, optional): Seed is used as entropy source for the random number engines to generate - pseudo-random numbers, - must be non-negative. Default: 0. + pseudo-random numbers, must be non-negative. Default: 0. Outputs: Tensor, has the same rows with input. The number of sampled indices of each row is `num_samples`. diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index 76bb558e01..47df7ffc82 100644 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -2488,7 +2488,7 @@ class ResizeBilinear(PrimitiveWithInfer): Inputs: - **input** (Tensor) - Image to be resized. Input images must be a 4-D tensor with shape - [batch, channels, height, width], with data type of float32 or float16. + :math:`(batch, channels, height, width)`, with data type of float32 or float16. Outputs: Tensor, resized image. 4-D with shape [batch, channels, new_height, new_width] in `float32`. @@ -2701,13 +2701,12 @@ class PReLU(PrimitiveWithInfer): >>> weight = Tensor(np.array([0.1, 0.6, -0.3]), mindspore.float32) >>> net = Net() >>> result = net(input_x, weight) - [[[-0.1 1. ] - [ 0. 2. ] - [0. 0. ]] - - [[-0.2 -0.1 ] - [2. -1.8000001] - [0.6 0.6 ]]] + [[[-0.1, 1.0], + [0.0, 2.0], + [0.0, 0.0]], + [[-0.2, -0.1], + [2.0, -1.8000001], + [0.6, 0.6]]] """ @prim_attr_register