Class RandomVerticalFlip
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
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.
- Parameters
prob – [in] A float representing the probability of flip.
样例/* 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
-
~RandomVerticalFlip() = default
Destructor.
-
explicit RandomVerticalFlip(float prob = 0.5)