Struct prophet::activation_fn::ActivationFn
[−]
[src]
pub struct ActivationFn<F: Float> { /* fields omitted */ }
Represents the pair of an activation function and its derivate.
Has some convenience constructors to build some commonly used activation functions with their respective derivate.
Methods
impl<F: Float> ActivationFn<F>
[src]
fn custom(base: fn(_: F) -> F, derived: fn(_: F) -> F) -> Self
Used to create custom pairs of activation functions for users who wish to use an activation function that is not already covered by this library.
fn base_fn(&self) -> BaseFn<F>
Returns the base function.
fn derived_fn(&self) -> DerivedFn<F>
Returns the derivation function.
fn base(&self, x: F) -> F
Forwards x
to the base function and returns its result.
fn derived(&self, x: F) -> F
Forwards x
to the derivation of the base function and returns its result.
fn identity() -> Self
Convenience constructor for the identity activation function.
fn binary_step() -> Self
Convenience constructor for the binary step activation function.
fn arctan() -> Self
Convenience constructor for the arcus tangens activation function.
fn tanh() -> Self
Convenience constructor for the tangens hyperbolicus (tanh) activation function.
fn logistic() -> Self
Convenience constructor for the logistic or sigmoid activation function.
fn softsign() -> Self
Convenience constructor for the soft sign activation function.
fn relu() -> Self
Convenience constructor for the ReLU activation function.
fn softplus() -> Self
Convenience constructor for the soft plus activation function.
fn bent_identity() -> Self
Convenience constructor for the bent identity activation function.
fn sinusoid() -> Self
Convenience constructor for the sinusoid activation function.
fn gaussian() -> Self
Convenience constructor for the gaussian activation function.
Trait Implementations
impl<F: Copy + Float> Copy for ActivationFn<F>
[src]
impl<F: Clone + Float> Clone for ActivationFn<F>
[src]
fn clone(&self) -> ActivationFn<F>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<F: Debug + Float> Debug for ActivationFn<F>
[src]
impl<F: PartialEq + Float> PartialEq for ActivationFn<F>
[src]
fn eq(&self, __arg_0: &ActivationFn<F>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ActivationFn<F>) -> bool
This method tests for !=
.