mindspore/docs/api/api_python/dataset_vision/mindspore.dataset.vision.Te...

16 lines
906 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.dataset.vision.TenCrop
================================
.. py:class:: mindspore.dataset.vision.TenCrop(size, use_vertical_flip=False)
在输入PIL图像的中心与四个角处分别裁剪指定尺寸大小的子图并将其翻转图一并返回。
参数:
- **size** (Union[int, Sequence[int, int]]) - 裁剪子图的尺寸大小。若输入int则以该值为边长裁剪( `size` , `size` )尺寸大小的子图若输入Sequence[int, int]则以2个元素分别为高和宽裁剪子图。
- **use_vertical_flip** (bool可选) - 若为True将对子图进行垂直翻转否则进行水平翻转。默认值False。
异常:
- **TypeError** - 当 `size` 的类型不为int或Sequence[int, int]。
- **TypeError** - 当 `use_vertical_flip` 的类型不为bool。
- **ValueError** - 当 `size` 不为正数。