Class RandomVerticalFlip

Inheritance Relationships

Base Type

Class Documentation

class RandomVerticalFlip : public mindspore::dataset::TensorTransform

Randomly flip the input image vertically with a given probability.

Public Functions

explicit RandomVerticalFlip(float prob = 0.5)

Constructor.

Example
/* Define operations */
auto decode_op = vision::Decode();
auto random_op = vision::RandomVerticalFlip();

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

参数

prob[in] A float representing the probability of flip.

~RandomVerticalFlip() = default

Destructor.