pub struct ShakeDrop<A: Float + FromPrimitive + Debug> {
pub p: A,
pub alpha_range: (A, A),
pub beta_range: (A, A),
/* private fields */
}Expand description
ShakeDrop regularization
ShakeDrop is a regularization method that extends Stochastic Depth and is often used in very deep neural networks. It randomly scales activations during training.
§Parameters
p- The probability of activating ShakeDrop (probability of activating the forward pass transformation), value between 0 and 1.alpha_range- The range for the alpha parameter used in forward pass (default: [-1.0, 1.0]).beta_range- The range for the beta parameter used in backward pass (default: [0.0, 1.0]).
§References
- Yamada, Y., Iwamura, M., & Kise, K. (2018). ShakeDrop regularization. arXiv preprint arXiv:1802.02375.
Fields§
§p: AProbability of applying ShakeDrop
alpha_range: (A, A)Range for the alpha parameter
beta_range: (A, A)Range for the beta parameter
Implementations§
Source§impl<A: Float + FromPrimitive + Debug + Send + Sync> ShakeDrop<A>
impl<A: Float + FromPrimitive + Debug + Send + Sync> ShakeDrop<A>
Sourcepub fn new_with_ranges(p: A, alpharange: (A, A), beta_range: (A, A)) -> Self
pub fn new_with_ranges(p: A, alpharange: (A, A), beta_range: (A, A)) -> Self
Trait Implementations§
Source§impl<A: Float + FromPrimitive + Debug + ScalarOperand, D: Dimension + Send + Sync> Regularizer<A, D> for ShakeDrop<A>
impl<A: Float + FromPrimitive + Debug + ScalarOperand, D: Dimension + Send + Sync> Regularizer<A, D> for ShakeDrop<A>
Auto Trait Implementations§
impl<A> Freeze for ShakeDrop<A>where
A: Freeze,
impl<A> RefUnwindSafe for ShakeDrop<A>where
A: RefUnwindSafe,
impl<A> Send for ShakeDrop<A>where
A: Send,
impl<A> Sync for ShakeDrop<A>where
A: Sync,
impl<A> Unpin for ShakeDrop<A>where
A: Unpin,
impl<A> UnwindSafe for ShakeDrop<A>where
A: UnwindSafe,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.