Enum prophet::Activation
[−]
[src]
pub enum Activation { Identity, BinaryStep, Logistic, Tanh, ArcTan, SoftSign, ReLU, SoftPlus, BentIdentity, Sinusoid, Gaussian, }
Represents an activation function.
Variants
Identity
Identity
: ƒ(x) = x
BinaryStep
Binary Step: ƒ(x) = 0 if x < 0 ƒ(x) = 1 if x ≥ 0
Logistic
Logistic function
Tanh
Tangens Hyperbolicus (tanh): ƒ(x) = tanh(x)
ArcTan
Arcus Tangens (atan): ƒ(x) = atan(x)
SoftSign
Soft Sign: ƒ(x) = x ⋅ (1 + |x|)⁻¹
ReLU
ReLU
:
ƒ(x) = 0 if x < 0
ƒ(x) = x else
SoftPlus
Soft Plus: ƒ(x) = ln(1 + eˣ)
BentIdentity
Bent Identity: ƒ(x) = ½(sqrt(x² + 1) - 1) + x
Sinusoid
Sinusoid: ƒ(x) = sin(x)
Gaussian
Gaussian: ƒ(x) = e⁻ˣˣ
Methods
impl Activation
[src]
fn base<F: NdFloat>(self, x: F) -> F
[src]
Returns f(x)
with a given x
and f
as the base function.
fn derived<F: NdFloat>(self, x: F) -> F
[src]
Returns dx(x)
with a given x
and dx
as the derived function.
Trait Implementations
impl Debug for Activation
[src]
impl Copy for Activation
[src]
impl Clone for Activation
[src]
fn clone(&self) -> Activation
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Activation
[src]
fn eq(&self, __arg_0: &Activation) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.