Skip to main content

Tanhshrink

Struct Tanhshrink 

Source
pub struct Tanhshrink<D: Float, T, const RANK: usize> { /* private fields */ }
Expand description

Tanhshrink activation layer: x - tanh(x).

Implementations§

Source§

impl<D: Float, T, const RANK: usize> Tanhshrink<D, T, RANK>

Source

pub fn new() -> Self

Creates a new Tanhshrink layer.

Trait Implementations§

Source§

impl<D: Float, T, const RANK: usize> Default for Tanhshrink<D, T, RANK>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<D: Float, const RANK: usize> Layer<SymTensor> for Tanhshrink<D, SymTensor, RANK>

Source§

type Output = SymTensor

This layer’s output type.
Source§

fn call(&self, input: SymTensor) -> SymTensor

Applies this layer to input.
Source§

impl<D: Float, T: Tensor<D, RANK> + EagerTensor, const RANK: usize> Layer<T> for Tanhshrink<D, T, RANK>

Source§

type Output = T

This layer’s output type.
Source§

fn call(&self, _input: T) -> Self::Output

Applies this layer to input.

Auto Trait Implementations§

§

impl<D, T, const RANK: usize> Freeze for Tanhshrink<D, T, RANK>

§

impl<D, T, const RANK: usize> RefUnwindSafe for Tanhshrink<D, T, RANK>

§

impl<D, T, const RANK: usize> Send for Tanhshrink<D, T, RANK>
where D: Send, T: Send,

§

impl<D, T, const RANK: usize> Sync for Tanhshrink<D, T, RANK>
where D: Sync, T: Sync,

§

impl<D, T, const RANK: usize> Unpin for Tanhshrink<D, T, RANK>
where D: Unpin, T: Unpin,

§

impl<D, T, const RANK: usize> UnsafeUnpin for Tanhshrink<D, T, RANK>

§

impl<D, T, const RANK: usize> UnwindSafe for Tanhshrink<D, T, RANK>
where D: UnwindSafe, T: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.