Skip to main content

Tanh

Struct Tanh 

Source
pub struct Tanh;
Expand description

Hyperbolic tangent: the 96-entry lookup table for the Q formats, tanh for f32 and f64 (feature std or libm).

Trait Implementations§

Source§

impl Activation<QValue<i16, 8>> for Tanh

Source§

fn activate(x: Q8_8) -> Q8_8

The activation of the weighted input sum x.
Source§

fn derivative(y: Q8_8) -> Q8_8

Derivative expressed in terms of the activation’s output y, the way tinymind (C++) computes it during back-propagation.
Source§

impl Activation<QValue<i32, 16>> for Tanh

Source§

fn activate(x: Q16_16) -> Q16_16

The activation of the weighted input sum x.
Source§

fn derivative(y: Q16_16) -> Q16_16

Derivative expressed in terms of the activation’s output y, the way tinymind (C++) computes it during back-propagation.
Source§

impl Activation<f32> for Tanh

Source§

fn activate(x: f32) -> f32

The activation of the weighted input sum x.
Source§

fn derivative(y: f32) -> f32

Derivative expressed in terms of the activation’s output y, the way tinymind (C++) computes it during back-propagation.
Source§

impl Activation<f64> for Tanh

Source§

fn activate(x: f64) -> f64

The activation of the weighted input sum x.
Source§

fn derivative(y: f64) -> f64

Derivative expressed in terms of the activation’s output y, the way tinymind (C++) computes it during back-propagation.

Auto Trait Implementations§

§

impl Freeze for Tanh

§

impl RefUnwindSafe for Tanh

§

impl Send for Tanh

§

impl Sync for Tanh

§

impl Unpin for Tanh

§

impl UnsafeUnpin for Tanh

§

impl UnwindSafe for Tanh

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.