Class AutoAugment
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class AutoAugment : public mindspore::dataset::TensorTransform
Apply AutoAugment data augmentation method.
Public Functions
-
explicit AutoAugment(AutoAugmentPolicy policy = AutoAugmentPolicy::kImageNet, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})
Constructor.
- Example
/* Define operations */ auto decode_op = vision::Decode(); auto auto_augment_op = vision::AutoAugment(AutoAugmentPolicy::kImageNet, InterpolationMode::kNearestNeighbour, {0, 0, 0}); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, auto_augment_op}, // operations {"image"}); // input columns
- Parameters
policy – [in] An enum for the data auto augmentation policy (default=AutoAugmentPolicy::kImageNet).
AutoAugmentPolicy::kImageNet, AutoAugment policy learned on the ImageNet dataset.
AutoAugmentPolicy::kCifar10, AutoAugment policy learned on the Cifar10 dataset.
AutoAugmentPolicy::kSVHN, AutoAugment policy learned on the SVHN dataset.
interpolation – [in] An enum for the mode of interpolation (default=InterpolationMode::kNearestNeighbour).
InterpolationMode::kNearestNeighbour, Interpolation method is nearest-neighbor interpolation.
InterpolationMode::kLinear, Interpolation method is blinear interpolation.
InterpolationMode::kCubic, Interpolation method is bicubic interpolation.
InterpolationMode::kArea, Interpolation method is pixel area interpolation.
fill_value – [in] A vector representing the pixel intensity of the borders (default={0, 0, 0}).
-
~AutoAugment() = default
Destructor.
-
explicit AutoAugment(AutoAugmentPolicy policy = AutoAugmentPolicy::kImageNet, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})