2022-06-07 15:47:49 +08:00
|
|
|
|
mindspore.dataset.vision.Rescale
|
|
|
|
|
|
================================
|
2022-02-12 10:34:53 +08:00
|
|
|
|
|
2022-06-07 15:47:49 +08:00
|
|
|
|
.. py:class:: mindspore.dataset.vision.Rescale(rescale, shift)
|
2022-02-12 10:34:53 +08:00
|
|
|
|
|
2022-05-13 17:16:44 +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-07-11 18:56:38 +08:00
|
|
|
|
参数:
|
|
|
|
|
|
- **rescale** (float) - 缩放因子。
|
|
|
|
|
|
- **shift** (float) - 平移因子。
|
2022-02-12 10:34:53 +08:00
|
|
|
|
|
2022-07-11 18:56:38 +08:00
|
|
|
|
异常:
|
|
|
|
|
|
- **TypeError** - 当 `rescale` 的类型不为float。
|
|
|
|
|
|
- **TypeError** - 当 `shift` 的类型不为float。
|