mindspore.dataset.vision.c_transforms.Rescale

class mindspore.dataset.vision.c_transforms.Rescale(rescale, shift)[source]

Tensor operation to rescale the input image.

Parameters
  • rescale (float) – Rescale factor.

  • shift (float) – Shift factor.

Examples

>>> import mindspore.dataset.vision.c_transforms as c_vision
>>>
>>> transforms_list = [c_vision.Decode(), c_vision.Rescale(1.0 / 255.0, -1.0)]
>>> data1 = data1.map(operations=transforms_list, input_columns=["image"])