From cac4f441fae5b8c35b3af2755d5731fd96126bf6 Mon Sep 17 00:00:00 2001 From: dinglinhe Date: Mon, 11 Oct 2021 14:15:56 +0800 Subject: [PATCH] repair the problems of code --- mindspore/nn/layer/basic.py | 2 +- mindspore/ops/operations/nn_ops.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/nn/layer/basic.py b/mindspore/nn/layer/basic.py index dc20df8e054..94107dabdee 100644 --- a/mindspore/nn/layer/basic.py +++ b/mindspore/nn/layer/basic.py @@ -856,7 +856,7 @@ class ResizeBilinear(Cell): - **x** (Tensor) - Tensor to be resized. Input tensor must be a 4-D tensor with shape :math:`(batch, channels, height, width)`, with data type of float16 or float32. - **size** (Union[tuple[int], list[int]]): A tuple or list of 2 int elements - :math:`(new\_height, new_\width)`,the new size of the tensor. + :math:`(new\_height, new\_width)`,the new size of the tensor. One and only one of size and scale_factor can be set to None. Default: None. - **scale_factor** (int): The scale factor of new size of the tensor. The value should be positive integer. One and only one of size and scale_factor can be set to None. Default: None. diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index 1dffb9cc162..858030b115c 100755 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -2007,7 +2007,7 @@ class MaxPool3D(PrimitiveWithInfer): raise ValueError(f"For '{self.name}', attr 'pad_list' should be an positive int number or a tuple of " f"three or six positive int numbers, but got {len(self.pad_list)} numbers.") if self.pad_mode != 'CALCULATED' and self.pad_list != (0, 0, 0, 0, 0, 0): - raise ValueError(f"For '{self.name}', the 'pad_list' must be zero when 'pad_mode' is not \"CALCULATED\", " + raise ValueError(f"For '{self.name}', the 'pad_list' must be zero when 'pad_mode' is not \"pad\", " f"but got 'pad_list' is {self.pad_list} and 'pad_mode' is {pad_mode}.") if self.pad_mode == 'CALCULATED': for item in self.pad_list: