Fix api bug for PReLU op.

This commit is contained in:
liuxiao93 2020-09-23 12:29:10 +08:00
parent 15b4115e55
commit 903d9dc911
3 changed files with 10 additions and 12 deletions

View File

@ -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.

View File

@ -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`.

View File

@ -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