Browse Source

fix chinese API

r1.7
liu-yongqi-63 4 years ago
parent
commit
6ed49972e8
19 changed files with 91 additions and 91 deletions
  1. +2
    -2
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.GaussianBlur.rst
  2. +3
    -3
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Pad.rst
  3. +2
    -2
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomAffine.rst
  4. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomColor.rst
  5. +4
    -4
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomColorAdjust.rst
  6. +4
    -4
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCrop.rst
  7. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCropDecodeResize.rst
  8. +4
    -4
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCropWithBBox.rst
  9. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResize.rst
  10. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizeWithBBox.rst
  11. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizedCrop.rst
  12. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizedCropWithBBox.rst
  13. +2
    -2
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomRotation.rst
  14. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Resize.rst
  15. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.ResizeWithBBox.rst
  16. +2
    -2
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Rotate.rst
  17. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.SoftDvppDecodeRandomCropResizeJpeg.rst
  18. +1
    -1
      docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.SoftDvppDecodeResizeJpeg.rst
  19. +58
    -58
      mindspore/python/mindspore/dataset/vision/c_transforms.py

+ 2
- 2
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.GaussianBlur.rst View File

@@ -7,10 +7,10 @@ mindspore.dataset.vision.c_transforms.GaussianBlur
**参数:**
- **kernel_size** (Union[int, sequence]) - 要使用的高斯核的大小。该值必须是正数和奇数。
- **kernel_size** (Union[int, Sequence[int]]) - 要使用的高斯核的大小。该值必须是正数和奇数。
如果只提供一个整数,高斯核大小将为 (kernel_size, kernel_size)。
如果提供了整数序列,则它必须是表示(宽度、高度)的 2 个值的序列。
- **sigma** (Union[float, sequence], 可选) - 要使用的高斯核的标准差,该值必须是正数,默认值:None。
- **sigma** (Union[float, Sequence[float]], 可选) - 要使用的高斯核的标准差,该值必须是正数,默认值:None。
如果仅提供浮点数,则 `sigma` 将为 (sigma, sigma)。
如果提供了浮点序列,则它必须是表示(宽度、高度)的 2 个值的序列。
如果为None, `sigma` 采用的值为 ((kernel\underline{} size - 1) * 0.5 - 1) * 0.3 + 0.8。


+ 3
- 3
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Pad.rst View File

@@ -7,12 +7,12 @@ mindspore.dataset.vision.c_transforms.Pad
**参数:**
- **padding** (Union[int, sequence]) - 图像各边填充的像素数。
- **padding** (Union[int, Sequence[int]]) - 图像各边填充的像素数。
如果 `padding` 是一个整数,代表为图像的所有方向填充该值大小的像素。
如果 `padding` 是一个包含2个值的元组或列表,第一个值会用于填充图像的左侧和上侧,第二个值会用于填充图像的右侧和下侧。
如果 `padding` 是一个包含4个值的元组或列表,则分别填充图像的左侧、上侧、右侧和下侧。
填充值必须为非负值。
- **fill_value** (Union[int, tuple], 可选) - 填充的像素值,仅在 `padding_mode` 取值为Border.CONSTANT时有效。
- **fill_value** (Union[int, tuple[int]], 可选) - 填充的像素值,仅在 `padding_mode` 取值为Border.CONSTANT时有效。
如果是3元素元组,则分别用于填充R、G、B通道。
如果是整数,则用于所有 RGB 通道。
`fill_value` 值必须在 [0, 255] 范围内, 默认值:0。
@@ -26,7 +26,7 @@ mindspore.dataset.vision.c_transforms.Pad
**异常:**
- **TypeError** - 如果 `padding` 不是int或Sequence[int]类型。
- **TypeError** - 如果 `fill_value` 不是int或Tuple[int]类型。
- **TypeError** - 如果 `fill_value` 不是int或tuple[int]类型。
- **TypeError** - 如果 `padding_mode` 不是 :class:`mindspore.dataset.vision.Border` 的类型。
- **ValueError** - 如果 `padding` 为负数。
- **ValueError** - 如果 `fill_value` 不在 [0, 255] 范围内。


+ 2
- 2
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomAffine.rst View File

@@ -27,7 +27,7 @@ mindspore.dataset.vision.c_transforms.RandomAffine
- **Inter.NEAREST**: 最近邻插值。
- **Inter.BICUBIC**: 双三次插值。
- **fill_value** (Union[int, tuple], 可选) - 用于填充输出图像中变换之外的区域。元组中必须有三个值,取值范围是[0, 255],默认值:0。
- **fill_value** (Union[int, tuple[int]], 可选) - 用于填充输出图像中变换之外的区域。元组中必须有三个值,取值范围是[0, 255],默认值:0。
**异常:**
@@ -36,7 +36,7 @@ mindspore.dataset.vision.c_transforms.RandomAffine
- **TypeError** - 如果 `scale` 不是sequence类型。
- **TypeError** - 如果 `shear` 不是int、float或sequence类型。
- **TypeError** - 如果 `resample` 不是 :class:`mindspore.dataset.vision.Inter` 的类型。
- **TypeError** - 如果 `fill_value` 不是int或Tuple[int]类型。
- **TypeError** - 如果 `fill_value` 不是int或tuple[int]类型。
- **ValueError** - 如果 `degrees` 为负数。
- **ValueError** - 如果 `translate` 不在范围 [-1.0, 1.0] 内。
- **ValueError** - 如果 `scale` 为负数。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomColor.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.RandomColor
**参数:**
- **degrees** (sequence, 可选) - 色彩调节系数的范围,必须为非负数。它应该是(min, max)格式。
- **degrees** (Sequence[float], 可选) - 色彩调节系数的范围,必须为非负数。它应该是(min, max)格式。
如果min与max相等,则代表色彩变化步长固定,默认值:(0.1,1.9)。
**异常:**


+ 4
- 4
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomColorAdjust.rst View File

@@ -9,16 +9,16 @@ mindspore.dataset.vision.c_transforms.RandomColorAdjust
**参数:**
- **brightness** (Union[float, list, tuple], 可选) - 亮度调整因子。不能为负,默认值:(1, 1)。
- **brightness** (Union[float, Sequence[float]], 可选) - 亮度调整因子。不能为负,默认值:(1, 1)。
如果是浮点数,则从 [max(0, 1-brightness), 1+brightness] 范围内统一选择因子。
如果它是一个序列,则代表是范围 [min, max],从此范围中选择调整因子。
- **contrast** (Union[float, list, tuple], 可选) - 对比度调整因子。不能为负,默认值:(1, 1)。
- **contrast** (Union[float, Sequence[float]], 可选) - 对比度调整因子。不能为负,默认值:(1, 1)。
如果是浮点数,则从 [max(0, 1-contrast), 1+contrast] 范围内统一选择因子。
如果它是一个序列,则代表是范围 [min, max],从此范围中选择调整因子。
- **saturation** (Union[float, list, tuple], 可选) - 饱和度调整因子。不能为负,默认值:(1, 1)。
- **saturation** (Union[float, Sequence[float]], 可选) - 饱和度调整因子。不能为负,默认值:(1, 1)。
如果是浮点数,则从 [max(0, 1-saturation), 1+saturation] 范围内统一选择因子。
如果它是一个序列,则代表是范围 [min, max],从此范围中选择调整因子。
- **hue** (Union[float, list, tuple], 可选) - 色调调整因子,默认值:(0, 0)。
- **hue** (Union[float, Sequence[float]], 可选) - 色调调整因子,默认值:(0, 0)。
如果是浮点数,则代表是范围 [-hue, hue],从此范围中选择调整因子。注意 `hue` 取值应为[0, 0.5]。
如果它是一个序列,则代表是范围 [min, max],从此范围中选择调整因子。注意取值范围min和max是 [-0.5, 0.5] 范围内的浮点数,并且min小于等于max。


+ 4
- 4
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCrop.rst View File

@@ -9,16 +9,16 @@ mindspore.dataset.vision.c_transforms.RandomCrop
**参数:**
- **size** (Union[int, sequence]) - 裁剪图像的输出尺寸大小。值必须为正。
- **size** (Union[int, Sequence[int]]) - 裁剪图像的输出尺寸大小。值必须为正。
如果 size 是整数,则返回一个裁剪尺寸大小为 (size, size) 的正方形。
如果 size 是一个长度为 2 的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **padding** (Union[int, sequence], 可选) - 图像各边填充的像素数。填充值必须为非负值,默认值:None。
- **padding** (Union[int, Sequence[int]], 可选) - 图像各边填充的像素数。填充值必须为非负值,默认值:None。
如果 `padding` 不为 None,则首先使用 `padding` 填充图像。
如果 `padding` 是一个整数,代表为图像的所有方向填充该值大小的像素。
如果 `padding` 是一个包含2个值的元组或列表,第一个值会用于填充图像的左侧和上侧,第二个值会用于填充图像的右侧和下侧。
如果 `padding` 是一个包含4个值的元组或列表,则分别填充图像的左侧、上侧、右侧和下侧。
- **pad_if_needed** (bool, 可选) - 如果输入图像高度或者宽度小于 `size` 指定的输出图像尺寸大小,是否进行填充。默认值:False。
- **fill_value** (Union[int, tuple], 可选) - 边框的像素强度,仅当 `padding_mode` 为 Border.CONSTANT 时有效。
- **fill_value** (Union[int, tuple[int]], 可选) - 边框的像素强度,仅当 `padding_mode` 为 Border.CONSTANT 时有效。
如果是3元素元组,则分别用于填充R、G、B通道。
如果是整数,则用于所有RGB通道。
`fill_value` 值必须在 [0, 255] 范围内,默认值:0。
@@ -34,7 +34,7 @@ mindspore.dataset.vision.c_transforms.RandomCrop
- **TypeError** - 如果 `size` 不是int或Sequence[int]类型。
- **TypeError** - 如果 `padding` 不是int或Sequence[int]类型。
- **TypeError** - 如果 `pad_if_needed` 不是bool类型。
- **TypeError** - 如果 `fill_value` 不是int或Tuple[int]类型。
- **TypeError** - 如果 `fill_value` 不是int或tuple[int]类型。
- **TypeError** - 如果 `padding_mode` 不是 :class:`mindspore.dataset.vision.Border` 的类型。
- **ValueError** - 如果 `size` 不是正数。
- **ValueError** - 如果 `padding` 为负数。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCropDecodeResize.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.RandomCropDecodeResize
**参数:**
- **size** (Union[int, sequence]) - 调整后图像的输出尺寸大小。大小值必须为正。
- **size** (Union[int, Sequence[int]]) - 调整后图像的输出尺寸大小。大小值必须为正。
如果 size 是整数,则返回一个裁剪尺寸大小为 (size, size) 的正方形。
如果 size 是一个长度为 2 的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **scale** (Union[list, tuple], 可选) - 要裁剪的原始尺寸大小的各个尺寸的范围[min, max),必须为非负数,默认值:(0.08, 1.0)。


+ 4
- 4
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomCropWithBBox.rst View File

@@ -7,16 +7,16 @@ mindspore.dataset.vision.c_transforms.RandomCropWithBBox
**参数:**
- **size** (Union[int, sequence]) - 裁剪图像的输出尺寸大小。大小值必须为正。
- **size** (Union[int, Sequence[int]]) - 裁剪图像的输出尺寸大小。大小值必须为正。
如果 size 是整数,则返回一个裁剪尺寸大小为 (size, size) 的正方形。
如果 size 是一个长度为 2 的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **padding** (Union[int, sequence], 可选) - 填充图像的像素数。填充值必须非负值,默认值:None。
- **padding** (Union[int, Sequence[int]], 可选) - 填充图像的像素数。填充值必须非负值,默认值:None。
如果 `padding` 不为 None,则首先使用 `padding` 填充图像。
如果 `padding` 是一个整数,代表为图像的所有方向填充该值大小的像素。
如果 `padding` 是一个包含2个值的元组或列表,第一个值会用于填充图像的左侧和上侧,第二个值会用于填充图像的右侧和下侧。
如果 `padding` 是一个包含4个值的元组或列表,则分别填充图像的左侧、上侧、右侧和下侧。
- **pad_if_needed** (bool, 可选) - 如果输入图像高度或者宽度小于 `size` 指定的输出图像尺寸大小,是否进行填充。默认值:False。
- **fill_value** (Union[int, tuple], 可选) - 边框的像素强度,仅当 `padding_mode` 为 Border.CONSTANT 时有效。
- **fill_value** (Union[int, tuple[int]], 可选) - 边框的像素强度,仅当 `padding_mode` 为 Border.CONSTANT 时有效。
如果是3元素元组,则分别用于填充R、G、B通道。
如果是整数,则用于所有 RGB 通道。
`fill_value` 值必须在 [0, 255] 范围内,默认值:0。
@@ -32,7 +32,7 @@ mindspore.dataset.vision.c_transforms.RandomCropWithBBox
- **TypeError** - 如果 `size` 不是int或Sequence[int]类型。
- **TypeError** - 如果 `padding` 不是int或Sequence[int]类型。
- **TypeError** - 如果 `pad_if_needed` 不是bool类型。
- **TypeError** - 如果 `fill_value` 不是int或Tuple[int]类型。
- **TypeError** - 如果 `fill_value` 不是int或tuple[int]类型。
- **TypeError** - 如果 `padding_mode` 不是 :class:`mindspore.dataset.vision.Border` 的类型。
- **ValueError** - 如果 `size` 不是正数。
- **ValueError** - 如果 `padding` 为负数。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResize.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.RandomResize
**参数:**
- **size** (Union[int, sequence]) - 调整后图像的输出尺寸大小。值必须为正。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 调整后图像的输出尺寸大小。值必须为正。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
**异常:**


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizeWithBBox.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.RandomResizeWithBBox

**参数:**

- **size** (Union[int, sequence]) - 调整后图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 调整后图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。

**异常:**



+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizedCrop.rst View File

@@ -9,7 +9,7 @@ mindspore.dataset.vision.c_transforms.RandomResizedCrop

**参数:**

- **size** (Union[int, sequence]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **scale** (Union[list, tuple], 可选) - 裁剪子图的尺寸大小相对原图比例的随机选取范围,需要在[min, max)区间,默认值:(0.08, 1.0)。
- **ratio** (Union[list, tuple], 可选) - 裁剪子图的宽高比的随机选取范围,需要在[min, max)区间,默认值:(3./4., 4./3.)。
- **interpolation** (Inter, 可选) - 插值方式。它可以是 [Inter.BILINEAR, Inter.NEAREST, Inter.BICUBIC, Inter.PILCUBIC] 中的任何一个,默认值:Inter.BILINEAR。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomResizedCropWithBBox.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.RandomResizedCropWithBBox

**参数:**

- **size** (Union[int, sequence]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **scale** (Union[list, tuple], 可选) - 裁剪子图的尺寸大小相对原图比例的随机选取范围,需要在[min, max)区间,默认值:(0.08, 1.0)。
- **ratio** (Union[list, tuple], 可选) - 裁剪子图的宽高比的随机选取范围,需要在[min, max)区间,默认值:(3./4., 4./3.)。
- **interpolation** (Inter, 可选) - 插值方式。它可以是 [Inter.BILINEAR, Inter.NEAREST, Inter.BICUBIC] 中的任何一个,默认值:Inter.BILINEAR。


+ 2
- 2
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.RandomRotation.rst View File

@@ -16,7 +16,7 @@ mindspore.dataset.vision.c_transforms.RandomRotation

- **expand** (bool, 可选) - 若为True,将扩展图像尺寸大小使其足以容纳整个旋转图像;若为False,则保持图像尺寸大小不变。请注意,扩展时将假设图像为中心旋转且未进行平移。默认值:False。
- **center** (tuple, 可选) - 可选的旋转中心,以图像左上角为原点,旋转中心的位置按照 (宽度, 高度) 格式指定。默认值:None,表示中心旋转。
- **fill_value** (Union[int, tuple], 可选) - 旋转图像之外区域的像素填充值。若输入3元素元组,将分别用于填充R、G、B通道;若输入整型,将以该值填充RGB通道。`fill_value` 值必须在 [0, 255] 范围内,默认值:0。
- **fill_value** (Union[int, tuple[int]], 可选) - 旋转图像之外区域的像素填充值。若输入3元素元组,将分别用于填充R、G、B通道;若输入整型,将以该值填充RGB通道。`fill_value` 值必须在 [0, 255] 范围内,默认值:0。

**异常:**

@@ -24,6 +24,6 @@ mindspore.dataset.vision.c_transforms.RandomRotation
- **TypeError** - 当 `resample` 的类型不为 :class:`mindspore.dataset.vision.Inter` 。
- **TypeError** - 当 `expand` 的类型不为bool。
- **TypeError** - 当 `center` 的类型不为tuple。
- **TypeError** - 当 `fill_value` 的类型不为int或Tuple[int]。
- **TypeError** - 当 `fill_value` 的类型不为int或tuple[int]。
- **ValueError** - 当 `fill_value` 取值不在[0, 255]范围内。
- **RuntimeError** - 当输入图像的shape不为<H, W>或<H, W, C>。

+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Resize.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.Resize

**参数:**

- **size** (Union[int, sequence]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 图像的输出尺寸大小。若输入整型,则放缩至(size, size)大小;若输入2元素序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **interpolation** (Inter, 可选) - 图像插值方式。它可以是 [Inter.LINEAR, Inter.NEAREST, Inter.BICUBIC, Inter.PILCUBIC] 中的任何一个,默认值:Inter.LINEAR。

- Inter.LINEAR,双线性插值。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.ResizeWithBBox.rst View File

@@ -7,7 +7,7 @@ mindspore.dataset.vision.c_transforms.ResizeWithBBox

**参数:**

- **size** (Union[int, sequence]) - 图像的输出尺寸大小。若输入整型,将调整图像的较短边长度为 `size`,且保持图像的宽高比不变;若输入是2元素组成的序列,其输入格式需要是 (高度, 宽度) 。
- **size** (Union[int, Sequence[int]]) - 图像的输出尺寸大小。若输入整型,将调整图像的较短边长度为 `size`,且保持图像的宽高比不变;若输入是2元素组成的序列,其输入格式需要是 (高度, 宽度) 。
- **interpolation** (Inter, 可选) - 图像插值方式。它可以是 [Inter.LINEAR, Inter.NEAREST, Inter.BICUBIC, Inter.PILCUBIC] 中的任何一个,默认值:Inter.LINEAR。

- Inter.LINEAR,双线性插值。


+ 2
- 2
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.Rotate.rst View File

@@ -16,7 +16,7 @@ mindspore.dataset.vision.c_transforms.Rotate

- **expand** (bool, 可选) - 若为True,将扩展图像尺寸大小使其足以容纳整个旋转图像;若为False,则保持图像尺寸大小不变。请注意,扩展时将假设图像为中心旋转且未进行平移。默认值:False。
- **center** (tuple, 可选) - 可选的旋转中心,以图像左上角为原点,旋转中心的位置按照 (宽度, 高度) 格式指定。默认值:None,表示中心旋转。
- **fill_value** (Union[int, tuple], 可选) - 旋转图像之外区域的像素填充值。若输入3元素元组,将分别用于填充R、G、B通道;若输入整型,将以该值填充RGB通道。 `fill_value` 值必须在 [0, 255] 范围内,默认值:0。
- **fill_value** (Union[int, tuple[int]], 可选) - 旋转图像之外区域的像素填充值。若输入3元素元组,将分别用于填充R、G、B通道;若输入整型,将以该值填充RGB通道。 `fill_value` 值必须在 [0, 255] 范围内,默认值:0。

**异常:**

@@ -24,6 +24,6 @@ mindspore.dataset.vision.c_transforms.Rotate
- **TypeError** - 当 `resample` 的类型不为 :class:`mindspore.dataset.vision.Inter` 。
- **TypeError** - 当 `expand` 的类型不为bool。
- **TypeError** - 当 `center` 的类型不为tuple。
- **TypeError** - 当 `fill_value` 的类型不为int或Tuple[int]。
- **TypeError** - 当 `fill_value` 的类型不为int或tuple[int]。
- **ValueError** - 当 `fill_value` 取值不在[0, 255]范围内。
- **RuntimeError** - 当输入图像的shape不为<H, W>或<H, W, C>。

+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.SoftDvppDecodeRandomCropResizeJpeg.rst View File

@@ -8,7 +8,7 @@ mindspore.dataset.vision.c_transforms.SoftDvppDecodeRandomCropResizeJpeg

**参数:**

- **size** (Union[int, sequence]) - 输出图像的尺寸大小。如果 `size` 是整型,则返回尺寸大小为 (size, size) 的正方形图像。如果 `size` 是一个长度为2的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 输出图像的尺寸大小。如果 `size` 是整型,则返回尺寸大小为 (size, size) 的正方形图像。如果 `size` 是一个长度为2的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **scale** (Union[list, tuple], 可选) - 裁剪子图的尺寸大小相对原图比例的随机选取范围,需要在[min, max)区间,默认值:(0.08, 1.0)。
- **ratio** (Union[list, tuple], 可选) - 裁剪子图的宽高比的随机选取范围,需要在[min, max)区间,默认值:(3./4., 4./3.)。
- **max_attempts** (int, 可选) - 生成随机裁剪位置的最大尝试次数,超过该次数时将使用中心裁剪, `max_attempts` 值必须为正数,默认值:10。


+ 1
- 1
docs/api/api_python/dataset_vision/mindspore.dataset.vision.c_transforms.SoftDvppDecodeResizeJpeg.rst View File

@@ -9,7 +9,7 @@ mindspore.dataset.vision.c_transforms.SoftDvppDecodeResizeJpeg

**参数:**

- **size** (Union[int, sequence]) - 图像的输出尺寸大小。如果 `size` 是整数,将调整图像的较短边长度为 `size`,且保持图像的宽高比不变;若输入是2元素组成的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。
- **size** (Union[int, Sequence[int]]) - 图像的输出尺寸大小。如果 `size` 是整数,将调整图像的较短边长度为 `size`,且保持图像的宽高比不变;若输入是2元素组成的序列,则以2个元素分别为高和宽放缩至(高度, 宽度)大小。

**异常:**



+ 58
- 58
mindspore/python/mindspore/dataset/vision/c_transforms.py View File

@@ -624,17 +624,17 @@ class GaussianBlur(ImageTensorOperation):
Blur input image with the specified Gaussian kernel.

Args:
kernel_size (Union[int, sequence]): Size of the Gaussian kernel to use. The value must be positive and odd. If
only an integer is provided, the kernel size will be (kernel_size, kernel_size). If a sequence of integer
kernel_size (Union[int, Sequence[int]]): Size of the Gaussian kernel to use. The value must be positive and odd.
if only an integer is provided, the kernel size will be (kernel_size, kernel_size). If a sequence of integer
is provided, it must be a sequence of 2 values which represents (width, height).
sigma (Union[float, sequence], optional): Standard deviation of the Gaussian kernel to use (default=None). The
value must be positive. If only a float is provided, the sigma will be (sigma, sigma). If a sequence of
float is provided, it must be a sequence of 2 values which represents (width, height). If None
is provided, the sigma will be calculated as ((kernel_size - 1) * 0.5 - 1) * 0.3 + 0.8.
sigma (Union[float, Sequence[float]], optional): Standard deviation of the Gaussian kernel to use
(default=None). The value must be positive. If only a float is provided, the sigma will be (sigma, sigma).
If a sequence of float is provided, it must be a sequence of 2 values which represents (width, height).
If None is provided, the sigma will be calculated as ((kernel_size - 1) * 0.5 - 1) * 0.3 + 0.8.

Raises:
TypeError: If `kernel_size` is not of type int or sequence of int.
TypeError: If `sigma` is not of type float or sequence of float.
TypeError: If `kernel_size` is not of type int or Sequence[int].
TypeError: If `sigma` is not of type float or Sequence[float].
ValueError: If `kernel_size` is not positive and odd.
ValueError: If `sigma` is not positive.
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.
@@ -857,13 +857,13 @@ class Pad(ImageTensorOperation):
Pad the image.

Args:
padding (Union[int, sequence]): The number of pixels to pad each border of the image.
padding (Union[int, Sequence[int]]): The number of pixels to pad each border of the image.
If a single number is provided, it pads all borders with this value.
If a tuple or lists of 2 values are provided, it pads the (left and top)
with the first value and (right and bottom) with the second value.
If 4 values are provided as a list or tuple, it pads the left, top, right and bottom respectively.
The pad values must be non-negative.
fill_value (Union[int, tuple], optional): The pixel intensity of the borders, only valid for
fill_value (Union[int, tuple[int]], optional): The pixel intensity of the borders, only valid for
padding_mode Border.CONSTANT. If it is a 3-tuple, it is used to fill R, G, B channels respectively.
If it is an integer, it is used for all RGB channels.
The fill_value values must be in range [0, 255] (default=0).
@@ -881,8 +881,8 @@ class Pad(ImageTensorOperation):
value of edge.

Raises:
TypeError: If `padding` is not of type int or sequence of int.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `padding` is not of type int or Sequence[int].
TypeError: If `fill_value` is not of type int or tuple[int].
TypeError: If `padding_mode` is not of type :class:`mindspore.dataset.vision.Border`.
ValueError: If `padding` is negative.
ValueError: If `fill_value` is not in range [0, 255].
@@ -982,7 +982,7 @@ class RandomAffine(ImageTensorOperation):

- Inter.BICUBIC, means resample method is bicubic interpolation.

fill_value (Union[int, tuple], optional): Optional fill_value to fill the area outside the transform
fill_value (Union[int, tuple[int]], optional): Optional fill_value to fill the area outside the transform
in the output image. There must be three elements in tuple and the value of single element is [0, 255].
(default=0, filling is performed).

@@ -992,7 +992,7 @@ class RandomAffine(ImageTensorOperation):
TypeError: If `scale` is not of type sequence.
TypeError: If `shear` is not of type int, float or sequence.
TypeError: If `resample` is not of type :class:`mindspore.dataset.vision.Inter`.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `fill_value` is not of type int or tuple[int].
ValueError: If `degrees` is negative.
ValueError: If `translate` is not in range [-1.0, 1.0].
ValueError: If `scale` is negative.
@@ -1106,12 +1106,12 @@ class RandomColor(ImageTensorOperation):
This operation works only with 3-channel RGB images.

Args:
degrees (sequence, optional): Range of random color adjustment degrees, which must be non-negative.
degrees (Sequence[float], optional): Range of random color adjustment degrees, which must be non-negative.
It should be in (min, max) format. If min=max, then it is a
single fixed magnitude operation (default=(0.1, 1.9)).

Raises:
TypeError: If `degrees` is not of type sequence of float.
TypeError: If `degrees` is not of type Sequence[float].
ValueError: If `degrees` is negative.
RuntimeError: If given tensor shape is not <H, W, C>.

@@ -1140,27 +1140,27 @@ class RandomColorAdjust(ImageTensorOperation):
This operation supports running on Ascend or GPU platforms by Offload.

Args:
brightness (Union[float, list, tuple], optional): Brightness adjustment factor (default=(1, 1)).
brightness (Union[float, Sequence[float]], optional): Brightness adjustment factor (default=(1, 1)).
Cannot be negative.
If it is a float, the factor is uniformly chosen from the range [max(0, 1-brightness), 1+brightness].
If it is a sequence, it should be [min, max] for the range.
contrast (Union[float, list, tuple], optional): Contrast adjustment factor (default=(1, 1)).
contrast (Union[float, Sequence[float]], optional): Contrast adjustment factor (default=(1, 1)).
Cannot be negative.
If it is a float, the factor is uniformly chosen from the range [max(0, 1-contrast), 1+contrast].
If it is a sequence, it should be [min, max] for the range.
saturation (Union[float, list, tuple], optional): Saturation adjustment factor (default=(1, 1)).
saturation (Union[float, Sequence[float]], optional): Saturation adjustment factor (default=(1, 1)).
Cannot be negative.
If it is a float, the factor is uniformly chosen from the range [max(0, 1-saturation), 1+saturation].
If it is a sequence, it should be [min, max] for the range.
hue (Union[float, list, tuple], optional): Hue adjustment factor (default=(0, 0)).
hue (Union[float, Sequence[float]], optional): Hue adjustment factor (default=(0, 0)).
If it is a float, the range will be [-hue, hue]. Value should be 0 <= hue <= 0.5.
If it is a sequence, it should be [min, max] where -0.5 <= min <= max <= 0.5.

Raises:
TypeError: If `brightness` is not of type float or sequence of float.
TypeError: If `contrast` is not of type float or sequence of float.
TypeError: If `saturation` is not of type float or sequence of float.
TypeError: If `hue` is not of type float or sequence of float.
TypeError: If `brightness` is not of type float or Sequence[float].
TypeError: If `contrast` is not of type float or Sequence[float].
TypeError: If `saturation` is not of type float or Sequence[float].
TypeError: If `hue` is not of type float or Sequence[float].
ValueError: If `brightness` is negative.
ValueError: If `contrast` is negative.
ValueError: If `saturation` is negative.
@@ -1215,10 +1215,10 @@ class RandomCrop(ImageTensorOperation):
If the input image is more than one, then make sure that the image size is the same.

Args:
size (Union[int, sequence]): The output size of the cropped image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the cropped image. The size value(s) must be positive.
If size is an integer, a square crop of size (size, size) is returned.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
padding (Union[int, sequence], optional): The number of pixels to pad each border of the image.
padding (Union[int, Sequence[int]], optional): The number of pixels to pad each border of the image.
The padding value(s) must be non-nagetive (default=None).
If padding is not None, pad image first with padding values.
If a single number is provided, pad all borders with this value.
@@ -1228,7 +1228,7 @@ class RandomCrop(ImageTensorOperation):
pad the left, top, right and bottom respectively.
pad_if_needed (bool, optional): Pad the image if either side is smaller than
the given output size (default=False).
fill_value (Union[int, tuple], optional): The pixel intensity of the borders, only valid for
fill_value (Union[int, tuple[int]], optional): The pixel intensity of the borders, only valid for
padding_mode Border.CONSTANT. If it is a 3-tuple, it is used to fill R, G, B channels respectively.
If it is an integer, it is used for all RGB channels.
The fill_value values must be in range [0, 255] (default=0).
@@ -1246,10 +1246,10 @@ class RandomCrop(ImageTensorOperation):
value of edge.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `padding` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `padding` is not of type int or Sequence[int].
TypeError: If `pad_if_needed` is not of type boolean.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `fill_value` is not of type int or tuple[int].
TypeError: If `padding_mode` is not of type :class:`mindspore.dataset.vision.Border`.
ValueError: If `size` is not positive.
ValueError: If `padding` is negative.
@@ -1296,7 +1296,7 @@ class RandomCropDecodeResize(ImageTensorOperation):
will crop the input image at a random location, decode the cropped image in RGB mode, and resize the decoded image.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, a square crop of size (size, size) is returned.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
scale (Union[list, tuple], optional): Range [min, max) of respective size of the
@@ -1321,7 +1321,7 @@ class RandomCropDecodeResize(ImageTensorOperation):
If exceeded, fall back to use center_crop instead. The max_attempts value must be positive.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `scale` is not of type tuple or list.
TypeError: If `ratio` is not of type tuple or list.
TypeError: If `interpolation` is not of type :class:`mindspore.dataset.vision.Inter`.
@@ -1377,10 +1377,10 @@ class RandomCropWithBBox(ImageTensorOperation):
Crop the input image at a random location and adjust bounding boxes accordingly.

Args:
size (Union[int, sequence]): The output size of the cropped image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the cropped image. The size value(s) must be positive.
If size is an integer, a square crop of size (size, size) is returned.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
padding (Union[int, sequence], optional): The number of pixels to pad the image
padding (Union[int, Sequence[int]], optional): The number of pixels to pad the image
The padding value(s) must be non-nagetive (default=None).
If padding is not None, first pad image with padding values.
If a single number is provided, pad all borders with this value.
@@ -1389,7 +1389,7 @@ class RandomCropWithBBox(ImageTensorOperation):
If 4 values are provided as a list or tuple, pad the left, top, right and bottom respectively.
pad_if_needed (bool, optional): Pad the image if either side is smaller than
the given output size (default=False).
fill_value (Union[int, tuple], optional): The pixel intensity of the borders, only valid for
fill_value (Union[int, tuple[int]], optional): The pixel intensity of the borders, only valid for
padding_mode Border.CONSTANT. If it is a 3-tuple, it is used to fill R, G, B channels respectively.
If it is an integer, it is used for all RGB channels.
The fill_value values must be in range [0, 255] (default=0).
@@ -1407,10 +1407,10 @@ class RandomCropWithBBox(ImageTensorOperation):
value of edge.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `padding` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `padding` is not of type int or Sequence[int].
TypeError: If `pad_if_needed` is not of type boolean.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `fill_value` is not of type int or tuple[int].
TypeError: If `padding_mode` is not of type :class:`mindspore.dataset.vision.Border`.
ValueError: If `size` is not positive.
ValueError: If `padding` is negative.
@@ -1646,7 +1646,7 @@ class RandomResizedCrop(ImageTensorOperation):
If the input image is more than one, then make sure that the image size is the same.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, a square of size (size, size) will be cropped with this value.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
scale (Union[list, tuple], optional): Range [min, max) of respective size of the original
@@ -1671,7 +1671,7 @@ class RandomResizedCrop(ImageTensorOperation):
crop_area (default=10). If exceeded, fall back to use center_crop instead.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `scale` is not of type tuple or list.
TypeError: If `ratio` is not of type tuple or list.
TypeError: If `interpolation` is not of type :class:`mindspore.dataset.vision.Inter`.
@@ -1716,7 +1716,7 @@ class RandomResizedCropWithBBox(ImageTensorOperation):
Crop the input image to a random size and aspect ratio and adjust bounding boxes accordingly.

Args:
size (Union[int, sequence]): The size of the output image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The size of the output image. The size value(s) must be positive.
If size is an integer, a square of size (size, size) will be cropped with this value.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
scale (Union[list, tuple], optional): Range (min, max) of respective size of the original
@@ -1736,7 +1736,7 @@ class RandomResizedCropWithBBox(ImageTensorOperation):
crop area (default=10). If exceeded, fall back to use center crop instead.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `scale` is not of type tuple or list.
TypeError: If `ratio` is not of type tuple or list.
TypeError: If `interpolation` is not of type :class:`mindspore.dataset.vision.Inter`.
@@ -1780,12 +1780,12 @@ class RandomResize(ImageTensorOperation):
Resize the input image using a randomly selected interpolation mode.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, a square of size (size, size) will be cropped with this value.
If size is a sequence of length 2, an image of size (height, width) will be cropped.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
ValueError: If `size` is not positive.
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.

@@ -1820,12 +1820,12 @@ class RandomResizeWithBBox(ImageTensorOperation):
bounding boxes accordingly.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, a square of size (size, size) will be cropped with this value.
If size is a sequence of length 2, an image of size (height, width) will be cropped.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
ValueError: If `size` is not positive.
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.

@@ -1877,7 +1877,7 @@ class RandomRotation(ImageTensorOperation):
Note that the expand flag assumes rotation around the center and no translation.
center (tuple, optional): Optional center of rotation (a 2-tuple) (default=None).
Origin is the top left corner. None sets to the center of the image.
fill_value (Union[int, tuple], optional): Optional fill color for the area outside the rotated image.
fill_value (Union[int, tuple[int]], optional): Optional fill color for the area outside the rotated image.
If it is a 3-tuple, it is used to fill R, G, B channels respectively.
If it is an integer, it is used for all RGB channels.
The fill_value values must be in range [0, 255] (default=0).
@@ -1887,7 +1887,7 @@ class RandomRotation(ImageTensorOperation):
TypeError: If `resample` is not of type :class:`mindspore.dataset.vision.Inter`.
TypeError: If `expand` is not of type boolean.
TypeError: If `center` is not of type tuple.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `fill_value` is not of type int or tuple[int].
ValueError: If `fill_value` is not in range [0, 255].
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.

@@ -2142,7 +2142,7 @@ class Resize(ImageTensorOperation):
Resize the input image to the given size with a given interpolation mode.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, a square of size (size, size) will be cropped with this value.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
interpolation (Inter, optional): Image interpolation mode (default=Inter.LINEAR).
@@ -2160,7 +2160,7 @@ class Resize(ImageTensorOperation):
should be in 3 channels format.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `interpolation` is not of type :class:`mindspore.dataset.vision.Inter`.
ValueError: If `size` is not positive.
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.
@@ -2193,7 +2193,7 @@ class ResizeWithBBox(ImageTensorOperation):
Resize the input image to the given size and adjust bounding boxes accordingly.

Args:
size (Union[int, sequence]): The output size of the resized image.
size (Union[int, Sequence[int]]): The output size of the resized image.
If size is an integer, smaller edge of the image will be resized to this value with
the same image aspect ratio.
If size is a sequence of length 2, it should be (height, width).
@@ -2207,7 +2207,7 @@ class ResizeWithBBox(ImageTensorOperation):
- Inter.BICUBIC, means interpolation method is bicubic interpolation.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `interpolation` is not of type :class:`mindspore.dataset.vision.Inter`.
ValueError: If `size` is not positive.
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.
@@ -2280,7 +2280,7 @@ class Rotate(ImageTensorOperation):
Note that the expand flag assumes rotation around the center and no translation.
center (tuple, optional): Optional center of rotation (a 2-tuple) (default=None).
Origin is the top left corner. None sets to the center of the image.
fill_value (Union[int, tuple], optional): Optional fill color for the area outside the rotated image.
fill_value (Union[int, tuple[int]], optional): Optional fill color for the area outside the rotated image.
If it is a 3-tuple, it is used to fill R, G, B channels respectively.
If it is an integer, it is used for all RGB channels.
The fill_value values must be in range [0, 255] (default=0).
@@ -2290,7 +2290,7 @@ class Rotate(ImageTensorOperation):
TypeError: If `resample` is not of type :class:`mindspore.dataset.vision.Inter`.
TypeError: If `expand` is not of type bool.
TypeError: If `center` is not of type tuple.
TypeError: If `fill_value` is not of type int or tuple of int.
TypeError: If `fill_value` is not of type int or tuple[int].
ValueError: If `fill_value` is not in range [0, 255].
RuntimeError: If given tensor shape is not <H, W> or <H, W, C>.

@@ -2390,7 +2390,7 @@ class SoftDvppDecodeRandomCropResizeJpeg(ImageTensorOperation):
Only images with an even resolution can be output. The output of odd resolution is not supported.

Args:
size (Union[int, sequence]): The size of the output image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The size of the output image. The size value(s) must be positive.
If size is an integer, a square crop of size (size, size) is returned.
If size is a sequence of length 2, an image of size (height, width) will be cropped.
scale (Union[list, tuple], optional): Range [min, max) of respective size of the
@@ -2401,7 +2401,7 @@ class SoftDvppDecodeRandomCropResizeJpeg(ImageTensorOperation):
If exceeded, fall back to use center_crop instead. The max_attempts value must be positive.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
TypeError: If `scale` is not of type tuple or list.
TypeError: If `ratio` is not of type tuple or list.
TypeError: If `max_attempts` is not of type int.
@@ -2451,13 +2451,13 @@ class SoftDvppDecodeResizeJpeg(ImageTensorOperation):
Only images with an even resolution can be output. The output of odd resolution is not supported.

Args:
size (Union[int, sequence]): The output size of the resized image. The size value(s) must be positive.
size (Union[int, Sequence[int]]): The output size of the resized image. The size value(s) must be positive.
If size is an integer, smaller edge of the image will be resized to this value with
the same image aspect ratio.
If size is a sequence of length 2, an image of size (height, width) will be cropped.

Raises:
TypeError: If `size` is not of type int or sequence of int.
TypeError: If `size` is not of type int or Sequence[int].
ValueError: If `size` is not positive.
RuntimeError: If given tensor is not a 1D sequence.



Loading…
Cancel
Save