pub struct Exp;
Expand description
Exponential activation function.
Trait Implementations
sourceimpl ActivationFunc for Exp
impl ActivationFunc for Exp
sourcefn func_grad_from_output(y: f64) -> f64
fn func_grad_from_output(y: f64) -> f64
The gradient of the activation function calculated using the output of the function.
Calculates f’(x) given f(x) as an input Read more
impl Copy for Exp
Auto Trait Implementations
impl RefUnwindSafe for Exp
impl Send for Exp
impl Sync for Exp
impl Unpin for Exp
impl UnwindSafe for Exp
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> NetLayer for Twhere
T: ActivationFunc,
impl<T> NetLayer for Twhere
T: ActivationFunc,
sourcefn forward(
&self,
input: &Matrix<f64>,
MatrixSlice<'_, f64>
) -> Result<Matrix<f64>, Error>
fn forward(
&self,
input: &Matrix<f64>,
MatrixSlice<'_, f64>
) -> Result<Matrix<f64>, Error>
Applies the activation function to each element of the input
sourcefn back_input(
&self,
out_grad: &Matrix<f64>,
&Matrix<f64>,
output: &Matrix<f64>,
MatrixSlice<'_, f64>
) -> Matrix<f64>
fn back_input(
&self,
out_grad: &Matrix<f64>,
&Matrix<f64>,
output: &Matrix<f64>,
MatrixSlice<'_, f64>
) -> Matrix<f64>
The gradient of the output of this layer with respect to its input
sourcefn back_params(
&self,
&Matrix<f64>,
&Matrix<f64>,
&Matrix<f64>,
MatrixSlice<'_, f64>
) -> Matrix<f64>
fn back_params(
&self,
&Matrix<f64>,
&Matrix<f64>,
&Matrix<f64>,
MatrixSlice<'_, f64>
) -> Matrix<f64>
The gradient of the output of this layer with respect to its parameters
sourcefn default_params(&self) -> Vec<f64, Global>
fn default_params(&self) -> Vec<f64, Global>
The default value of the parameters of this layer before training
sourcefn param_shape(&self) -> (usize, usize)
fn param_shape(&self) -> (usize, usize)
The shape of the parameters used by this layer
sourcefn num_params(&self) -> usize
fn num_params(&self) -> usize
The number of parameters used by this layer
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more