Class RandomHorizontalFlip
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandomHorizontalFlip : public mindspore::dataset::TensorTransform
Randomly flip the input image horizontally with a given probability.
Public Functions
-
explicit RandomHorizontalFlip(float prob = 0.5)
Constructor.
- 参数
prob – [in] A float representing the probability of flip.
样例/* Define operations */ auto decode_op = vision::Decode(); auto random_op = vision::RandomHorizontalFlip(0.8); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, random_op}, // operations {"image"}); // input columns
-
~RandomHorizontalFlip() = default
Destructor.
-
explicit RandomHorizontalFlip(float prob = 0.5)