oa::ml::Parameter

Named trainable FP32 matrix with one live accumulated gradient.

StRust public API

Declaration

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

Public Methods

pub fn name(&self) -> String
pub fn data(&self) -> Matrix
pub fn gradient(&self) -> Option<Matrix>
pub fn set_requires_grad(&self, requires_grad: bool)
pub fn requires_grad(&self) -> bool
fn clone(&self) -> Parameter

Associated Functions

pub fn new(name: impl Into<String>, data: Matrix) -> Result<Self>

Public Method Documentation

pub fn name( &self ) -> String
No public source comment is attached to this declaration.
pub fn data( &self ) -> Matrix
No public source comment is attached to this declaration.
pub fn gradient( &self ) -> Option<Matrix>
No public source comment is attached to this declaration.
pub fn set_requires_grad( &self, requires_grad: bool )
No public source comment is attached to this declaration.
pub fn requires_grad( &self ) -> bool
No public source comment is attached to this declaration.
fn clone( &self ) -> Parameter
No public source comment is attached to this declaration.
pub fn new( name: impl Into<String>, data: Matrix ) -> Result<Self>
No public source comment is attached to this declaration.