Skip to main content

GradAdjuster

Trait GradAdjuster 

Source
pub trait GradAdjuster<G: Gradients> {
    // Required method
    fn adjust(&mut self, gradient_updates: G, loss: f32) -> G;
}
Expand description

An object responsible for tweaking gradient updates, such as to add the effects of momentum, perform gradient clipping, etc.

Required Methods§

Source

fn adjust(&mut self, gradient_updates: G, loss: f32) -> G

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§