pub struct RandomErasingAugmenter {
pub probability: f64,
pub scale_min: f64,
pub scale_max: f64,
pub ratio_min: f64,
pub ratio_max: f64,
pub fill_value: f64,
}Expand description
Random Erasing augmentation.
Randomly erases rectangular regions in the input data with random values. This technique prevents overfitting and improves generalization, especially for image data.
Reference: Zhong et al., “Random Erasing Data Augmentation” (AAAI 2020)
§Parameters
p: Probability of applying erasing (default: 0.5)scale: Range of proportion of erased area (default: [0.02, 0.33])ratio: Range of aspect ratio of erased area (default: [0.3, 3.3])value: Value to fill erased region (0.0 = zero, 1.0 = random, -1.0 = pixel mean)
Fields§
§probability: f64Probability of applying erasing.
scale_min: f64Minimum proportion of erased area.
scale_max: f64Maximum proportion of erased area.
ratio_min: f64Minimum aspect ratio.
ratio_max: f64Maximum aspect ratio.
fill_value: f64Fill value (0.0 = zero, 1.0 = random).
Implementations§
Trait Implementations§
Source§impl Clone for RandomErasingAugmenter
impl Clone for RandomErasingAugmenter
Source§fn clone(&self) -> RandomErasingAugmenter
fn clone(&self) -> RandomErasingAugmenter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DataAugmenter for RandomErasingAugmenter
impl DataAugmenter for RandomErasingAugmenter
Source§fn augment(
&self,
data: &ArrayView2<'_, f64>,
rng: &mut StdRng,
) -> TrainResult<Array2<f64>>
fn augment( &self, data: &ArrayView2<'_, f64>, rng: &mut StdRng, ) -> TrainResult<Array2<f64>>
Augment the given data. Read more
Source§impl Debug for RandomErasingAugmenter
impl Debug for RandomErasingAugmenter
Auto Trait Implementations§
impl Freeze for RandomErasingAugmenter
impl RefUnwindSafe for RandomErasingAugmenter
impl Send for RandomErasingAugmenter
impl Sync for RandomErasingAugmenter
impl Unpin for RandomErasingAugmenter
impl UnwindSafe for RandomErasingAugmenter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more