Class MixUpBatch

Inheritance Relationships

Base Type

Class Documentation

class MixUpBatch : public mindspore::dataset::TensorTransform

Apply MixUp transformation on an input batch of images and labels. The labels must be in one-hot format and Batch must be called before calling this function.

Public Functions

explicit MixUpBatch(float alpha = 1)

Constructor.

Example
/* dataset is an instance of Dataset object */
dataset = dataset->Batch(5);
dataset = dataset->Map({std::make_shared<vision::MixUpBatch>()}, // operations
                       {"image"});                               // input columns

参数

alpha[in] hyperparameter of beta distribution (default = 1.0).

~MixUpBatch() = default

Destructor.