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

14 lines
493 B
ReStructuredText
Raw Permalink 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.RandomGrayscale
========================================
.. py:class:: mindspore.dataset.vision.RandomGrayscale(prob=0.1)
按照指定的概率将输入PIL图像转换为灰度图。
参数:
- **prob** (float可选) - 执行灰度转换的概率,取值范围:[0.0, 1.0]。默认值0.1。
异常:
- **TypeError** - 当 `prob` 的类型不为float。
- **ValueError** - 当 `prob` 取值不在[0.0, 1.0]范围内。