pub struct RMSDiv<E: Float + MatMulImpl, const I: usize> { /* private fields */ }Expand description
A layer which divides each feature by the RMS of all features.
Trait Implementations§
Source§impl<E: Float + MatMulImpl, const I: usize> LoadableModule for RMSDiv<E, I>
impl<E: Float + MatMulImpl, const I: usize> LoadableModule for RMSDiv<E, I>
Source§impl<E: Float + MatMulImpl, const I: usize> RevModule<[E; I]> for RMSDiv<E, I>
impl<E: Float + MatMulImpl, const I: usize> RevModule<[E; I]> for RMSDiv<E, I>
Source§type SelfGrads = ()
type SelfGrads = ()
The type describing gradients with respect to the modules’ own parameters.
Auto Trait Implementations§
impl<E, const I: usize> Freeze for RMSDiv<E, I>
impl<E, const I: usize> RefUnwindSafe for RMSDiv<E, I>where
E: RefUnwindSafe,
impl<E, const I: usize> Send for RMSDiv<E, I>
impl<E, const I: usize> Sync for RMSDiv<E, I>
impl<E, const I: usize> Unpin for RMSDiv<E, I>
impl<E, const I: usize> UnsafeUnpin for RMSDiv<E, I>
impl<E, const I: usize> UnwindSafe for RMSDiv<E, I>where
E: UnwindSafe,
Blanket Implementations§
Source§impl<Input, M> BackpropModule<Input> for Mwhere
M: TracedModule<Input, Trace = Input> + RevModule<Input> + BaseModule,
impl<Input, M> BackpropModule<Input> for Mwhere
M: TracedModule<Input, Trace = Input> + RevModule<Input> + BaseModule,
Source§type SelfGrads = <M as RevModule<Input>>::SelfGrads
type SelfGrads = <M as RevModule<Input>>::SelfGrads
Type describing movement in the modules’ own parameters in response to backpropagation.
Source§fn backprop(
&self,
trace: &<M as TracedModule<Input>>::Trace,
grads_wrt_output: <M as Module<Input>>::Output,
) -> (Input, <M as BackpropModule<Input>>::SelfGrads)
fn backprop( &self, trace: &<M as TracedModule<Input>>::Trace, grads_wrt_output: <M as Module<Input>>::Output, ) -> (Input, <M as BackpropModule<Input>>::SelfGrads)
Computes gradients for this layer/module, given tracing state from forward
execution, and the gradients of the output. Read more
Source§fn update(
&mut self,
applyer: &mut impl GradApplyer,
updates: <M as BackpropModule<Input>>::SelfGrads,
) -> Result<(), ()>
fn update( &mut self, applyer: &mut impl GradApplyer, updates: <M as BackpropModule<Input>>::SelfGrads, ) -> Result<(), ()>
Applies a gradient update step, given (Self::SelfGrads) and a
GradApplyer. Read moreSource§fn new_momentum(
&self,
params: TrainParams,
momentum_coefficient: f32,
) -> Momentum<Self::SelfGrads>
fn new_momentum( &self, params: TrainParams, momentum_coefficient: f32, ) -> Momentum<Self::SelfGrads>
Returns a
GradApplyer object needed to train using SGD + momentum.Source§fn new_rmsprop(
&self,
params: TrainParams,
beta: f32,
) -> RMSProp<Self::SelfGrads>
fn new_rmsprop( &self, params: TrainParams, beta: f32, ) -> RMSProp<Self::SelfGrads>
Returns a
GradApplyer object needed to train using rmsprop.Source§fn new_rmsprop_with_momentum(
&self,
params: TrainParams,
momentum_coefficient: f32,
beta: f32,
) -> RMSProp<Self::SelfGrads>
fn new_rmsprop_with_momentum( &self, params: TrainParams, momentum_coefficient: f32, beta: f32, ) -> RMSProp<Self::SelfGrads>
Returns a
GradApplyer object needed to train using rmsprop + momentum.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<Input, M> TracedModule<Input> for Mwhere
M: Module<Input> + BaseModule,
impl<Input, M> TracedModule<Input> for Mwhere
M: Module<Input> + BaseModule,
Source§fn traced_forward(
&self,
x: Input,
) -> Result<(<M as Module<Input>>::Output, <M as TracedModule<Input>>::Trace), ()>
fn traced_forward( &self, x: Input, ) -> Result<(<M as Module<Input>>::Output, <M as TracedModule<Input>>::Trace), ()>
Same as Module::forward, except intermediate computations that are needed
for backprop are returned.