[−][src]Struct neuro::layers::BatchNorm
Defines a batch normalization layer.
Methods
impl BatchNorm
[src]
pub fn new() -> Box<BatchNorm>
[src]
Creates a batch normalization layer.
By default, the momentum used by the running averages is set to 0.99 and the epsilon value used for numerical stability to 1e-5.
pub fn with_param(momentum: PrimitiveType, eps: PrimitiveType) -> Box<BatchNorm>
[src]
Creates a batch normalization layers with the given momentum.
Arguments
momentum
- The momentum used by the running averages to compute the mean and standard deviation of the data set.eps
- A small constant used for numerical stability.
pub fn mean(&self) -> Tensor
[src]
Returns the current estimate of the dataset mean.
pub fn variance(&self) -> Tensor
[src]
Returns the current estimate of the dataset variance.
Trait Implementations
impl Display for BatchNorm
[src]
impl Layer for BatchNorm
[src]
fn name(&self) -> &str
[src]
fn initialize_parameters(&mut self, input_shape: Dim4)
[src]
fn compute_activation(&self, input: &Tensor) -> Tensor
[src]
fn compute_activation_mut(&mut self, input: &Tensor) -> Tensor
[src]
fn compute_dactivation_mut(&mut self, dz: &Tensor) -> Tensor
[src]
fn output_shape(&self) -> Dim4
[src]
fn parameters(&self) -> Option<Vec<&Tensor>>
[src]
fn parameters_mut(&mut self) -> Option<(Vec<&mut Tensor>, Vec<&Tensor>)>
[src]
fn save(&self, group: &Group, layer_number: usize) -> Result<(), Error>
[src]
fn set_regularizer(&mut self, _regularizer: Option<Regularizer>)
[src]
fn print(&self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for BatchNorm
impl Send for BatchNorm
impl Sync for BatchNorm
impl Unpin for BatchNorm
impl UnwindSafe for BatchNorm
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,