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

19 lines
597 B
ReStructuredText
Raw Normal View History

mindspore.dataset.vision.Rescale
================================
2022-02-12 10:34:53 +08:00
.. py:class:: mindspore.dataset.vision.Rescale(rescale, shift)
2022-02-12 10:34:53 +08:00
基于给定的缩放和平移因子调整图像的像素大小。输出图像的像素大小为output = image * rescale + shift。
2022-02-12 10:34:53 +08:00
2022-04-01 11:52:43 +08:00
.. note:: 此操作支持通过 Offload 在 Ascend 或 GPU 平台上运行。
2022-02-12 10:34:53 +08:00
**参数:**
- **rescale** (float) - 缩放因子。
- **shift** (float) - 平移因子。
**异常:**
- **TypeError** - 当 `rescale` 的类型不为float。
- **TypeError** - 当 `shift` 的类型不为float。