oa::ml::Adam

optimizer over stable Parameter handles.

StRust public API

Declaration

pub struct Adam { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn zero_grad(&self)
pub fn step(&mut self) -> Result<()>
pub const fn learning_rate(&self) -> f32
pub fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
pub const fn step_count(&self) -> u32
fn zero_grad(&self)
fn step(&mut self) -> Result<()>
fn learning_rate(&self) -> f32
fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
fn step_count(&self) -> u64
fn belongs_to(&self, engine: &Engine) -> bool

Associated Functions

pub fn new( parameters: impl IntoIterator<Item = Parameter>, learning_rate: f32, ) -> Result<Self>
pub fn with_hyperparameters( parameters: impl IntoIterator<Item = Parameter>, learning_rate: f32, beta1: f32, beta2: f32, epsilon: f32, ) -> Result<Self>

Public Method Documentation

pub fn zero_grad( &self )
No public source comment is attached to this declaration.
pub fn step(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub const fn learning_rate( &self ) -> f32
No public source comment is attached to this declaration.
pub fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
No public source comment is attached to this declaration.
pub const fn step_count( &self ) -> u32
No public source comment is attached to this declaration.
fn zero_grad( &self )
No public source comment is attached to this declaration.
fn step(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn learning_rate( &self ) -> f32
No public source comment is attached to this declaration.
fn set_learning_rate(&mut self, learning_rate: f32) -> Result<()>
No public source comment is attached to this declaration.
fn step_count( &self ) -> u64
No public source comment is attached to this declaration.
fn belongs_to( &self, engine: &Engine ) -> bool
No public source comment is attached to this declaration.
pub fn new( parameters: impl IntoIterator<Item = Parameter>, learning_rate: f32 ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn with_hyperparameters( parameters: impl IntoIterator<Item = Parameter>, learning_rate: f32, beta1: f32, beta2: f32, epsilon: f32 ) -> Result<Self>
No public source comment is attached to this declaration.