Class Rescale

Inheritance Relationships

Base Type

Class Documentation

class Rescale : public mindspore::dataset::TensorTransform

Rescale the pixel value of input image.

Public Functions

Rescale(float rescale, float shift)

Constructor.

Parameters
  • rescale[in] Rescale factor.

  • shift[in] Shift factor.

样例
/* Define operations */
auto decode_op = vision::Decode();
auto rescale_op = vision::Rescale(1.0, 0.0);

/* dataset is an instance of Dataset object */
dataset = dataset->Map({decode_op, rescale_op},  // operations
                       {"image"});               // input columns
~Rescale() = default

Destructor.