pub struct RandomErasing {
pub p: f64,
pub fill_value: f64,
pub min_area_ratio: f64,
pub max_area_ratio: f64,
}Expand description
Erase a random rectangular region, replacing with a constant value.
Uses a random rectangle whose area is [min_area_ratio, max_area_ratio]
of the total, with aspect ratio in [min_aspect, max_aspect].
Expects feature_shape = [C, H, W].
Fields§
§p: f64§fill_value: f64§min_area_ratio: f64§max_area_ratio: f64Implementations§
Trait Implementations§
Source§impl Clone for RandomErasing
impl Clone for RandomErasing
Source§fn clone(&self) -> RandomErasing
fn clone(&self) -> RandomErasing
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 Debug for RandomErasing
impl Debug for RandomErasing
Auto Trait Implementations§
impl Freeze for RandomErasing
impl RefUnwindSafe for RandomErasing
impl Send for RandomErasing
impl Sync for RandomErasing
impl Unpin for RandomErasing
impl UnsafeUnpin for RandomErasing
impl UnwindSafe for RandomErasing
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