Class RandAugment
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandAugment : public mindspore::dataset::TensorTransform
Apply RandAugment data augmentation method.
Public Functions
-
explicit RandAugment(int32_t num_ops = 2, int32_t magnitude = 9, int32_t num_magnitude_bins = 31, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})
Constructor.
- Parameters
num_ops – [in] Number of augmentation transformations to apply sequentially. Default: 2.
magnitude – [in] Magnitude for all the transformations. Default: 9.
num_magnitude_bins – [in] The number of different magnitude values. Default: 31.
interpolation – [in] An enum for the mode of interpolation. Default: InterpolationMode::kNearestNeighbour.
InterpolationMode::kLinear, Interpolation method is blinear interpolation.
InterpolationMode::kNearestNeighbour, Interpolation method is nearest-neighbor interpolation.
InterpolationMode::kCubic, Interpolation method is bicubic interpolation.
fill_value – [in] A vector representing the pixel intensity of the borders. Default: {0, 0, 0}.
样例/* Define operations */ auto decode_op = vision::Decode(); auto rand_augment_op = vision::RandAugment(); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, rand_augment_op}, // operations {"image"}); // input columns
-
~RandAugment() = default
Destructor.
-
explicit RandAugment(int32_t num_ops = 2, int32_t magnitude = 9, int32_t num_magnitude_bins = 31, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})