Struct candle_nn::batch_norm::BatchNorm
source · pub struct BatchNorm { /* private fields */ }
Implementations§
source§impl BatchNorm
impl BatchNorm
pub fn new( num_features: usize, running_mean: Tensor, running_var: Tensor, weight: Tensor, bias: Tensor, eps: f64 ) -> Result<Self>
pub fn new_no_bias( num_features: usize, running_mean: Tensor, running_var: Tensor, eps: f64 ) -> Result<Self>
pub fn new_with_momentum( num_features: usize, running_mean: Tensor, running_var: Tensor, weight: Tensor, bias: Tensor, eps: f64, momentum: f64 ) -> Result<Self>
pub fn new_no_bias_with_momentum( num_features: usize, running_mean: Tensor, running_var: Tensor, eps: f64, momentum: f64 ) -> Result<Self>
pub fn running_mean(&self) -> &Tensor
pub fn running_var(&self) -> &Tensor
pub fn eps(&self) -> f64
pub fn weight_and_bias(&self) -> Option<(&Tensor, &Tensor)>
pub fn momentum(&self) -> f64
pub fn forward_train(&self, x: &Tensor) -> Result<Tensor>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchNorm
impl !RefUnwindSafe for BatchNorm
impl Send for BatchNorm
impl Sync for BatchNorm
impl Unpin for BatchNorm
impl !UnwindSafe for BatchNorm
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