!24655 Repair the problems of code

Merge pull request !24655 from dinglinhe/code_dlh_ms_I4D60M
This commit is contained in:
i-robot 2021-10-12 01:07:54 +00:00 committed by Gitee
commit 8afd1d1f64
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -2009,7 +2009,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: