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

21 lines
1.2 KiB
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.CutMixBatch
=================================================
.. py:class:: mindspore.dataset.vision.CutMixBatch(image_batch_format, alpha=1.0, prob=1.0)
对输入批次的图像和标注应用剪切混合转换。
请注意,在调用此操作符之前,您需要将标注制作为 one-hot 格式并进行批处理。
参数:
- **image_batch_format** (ImageBatchFormat) - 图像批处理输出格式。可以是 [ImageBatchFormat.NHWC、ImageBatchFormat.NCHW] 中的任何一个。
- **alpha** (float, 可选) - β分布的超参数必须大于0。默认值1.0。
- **prob** (float, 可选) - 对每个图像应用剪切混合处理的概率,取值范围:[0.0, 1.0]。默认值1.0。
异常:
- **TypeError** - 如果 `image_batch_format` 不是 :class:`mindspore.dataset.vision.ImageBatchFormat` 的类型。
- **TypeError** - 如果 `alpha` 不是float类型。
- **TypeError** - 如果 `prob` 不是 float 类型。
- **ValueError** - 如果 `alpha` 小于或等于 0。
- **ValueError** - 如果 `prob` 不在 [0.0, 1.0] 范围内。
- **RuntimeError** - 如果输入图像的shape不是 <H, W, C>。