modify pad docs

This commit is contained in:
fengyihang 2022-12-26 16:11:50 +08:00
parent 939db14f6c
commit e4b777b547
2 changed files with 2 additions and 2 deletions

View File

@ -30,5 +30,5 @@ mindspore.ops.pad
异常:
- **TypeError** - `padding` 不是全为int的tuple或者list。
- **TypeError** - `input_x` 不是Tensor。
- **ValueError** - `paddings`shape不等于 2 * len(input_x)
- **ValueError** - `paddings`长度不为偶数
- **ValueError** - mode不为"constant"并且value不为None。

View File

@ -2452,7 +2452,7 @@ def pad(input_x, padding, mode='constant', value=None):
Raises:
TypeError: If `paddings` is not an int of tuple or int of list.
TypeError: If `input_x` is not a Tensor.
ValueError: If padding.size is not equal to 2 * len(input_x).
ValueError: If length of `padding` is not even.
ValueError: If mode is not "constant" and value not None.
Supported Platforms: