2.5K Star 8.4K Fork 4.7K

GVPMindSpore/mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindspore.dataset.vision.Rescale.rst 784 Bytes
一键复制 编辑 原始数据 按行查看 历史
俞涵 提交于 2024-04-23 09:58 . modify error html links

mindspore.dataset.vision.Rescale

.. py:class:: mindspore.dataset.vision.Rescale(rescale, shift)

    基于给定的缩放和平移因子调整图像的像素大小。输出图像的像素大小为:output = image * rescale + shift。

    .. note:: 此操作默认通过 CPU 执行,也支持异构加速到 GPU 或 Ascend 上执行。

    参数:
        - **rescale** (float) - 缩放因子。
        - **shift** (float) - 平移因子。

    异常:
        - **TypeError** - 当 `rescale` 的类型不为float。
        - **TypeError** - 当 `shift` 的类型不为float。

    教程样例:
        - `视觉变换样例库
          <https://www.mindspore.cn/docs/zh-CN/r2.3.0rc1/api_python/samples/dataset/vision_gallery.html>`_
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
r2.3.q1

搜索帮助