Trait NdActivate

Source
pub trait NdActivate<A, D>
where A: ScalarOperand, D: Dimension,
{ type Data: Data<Elem = A>;
Show 14 methods // Required method fn activate<B, F>(&self, f: F) -> Array<B, D> where F: Fn(A) -> B; // Provided methods fn linear(&self) -> Array<A, D> where A: Clone { ... } fn linear_derivative(&self) -> Array<A, D> where A: One { ... } fn heavyside(&self) -> Array<A, D> where A: One + PartialOrd + Zero { ... } fn relu(&self) -> Array<A, D> where A: PartialOrd + Zero { ... } fn relu_derivative(&self) -> Array<A, D> where A: PartialOrd + One + Zero { ... } fn sigmoid(&self) -> Array<A, D> where A: Float { ... } fn sigmoid_derivative(&self) -> Array<A, D> where A: Float { ... } fn sigmoid_complex(&self) -> Array<A, D> where A: ComplexFloat { ... } fn sigmoid_complex_derivative(&self) -> Array<A, D> where A: ComplexFloat { ... } fn softmax(&self) -> Array<A, D> where A: ComplexFloat { ... } fn softmax_axis(&self, axis: usize) -> Array<A, D> where A: ComplexFloat, D: RemoveAxis { ... } fn tanh(&self) -> Array<A, D> where A: ComplexFloat { ... } fn tanh_derivative(&self) -> Array<A, D> where A: ComplexFloat { ... }
}

Required Associated Types§

Source

type Data: Data<Elem = A>

Required Methods§

Source

fn activate<B, F>(&self, f: F) -> Array<B, D>
where F: Fn(A) -> B,

Provided Methods§

Source

fn linear(&self) -> Array<A, D>
where A: Clone,

Source

fn linear_derivative(&self) -> Array<A, D>
where A: One,

Source

fn heavyside(&self) -> Array<A, D>
where A: One + PartialOrd + Zero,

Source

fn relu(&self) -> Array<A, D>
where A: PartialOrd + Zero,

Source

fn relu_derivative(&self) -> Array<A, D>
where A: PartialOrd + One + Zero,

Source

fn sigmoid(&self) -> Array<A, D>
where A: Float,

Source

fn sigmoid_derivative(&self) -> Array<A, D>
where A: Float,

Source

fn sigmoid_complex(&self) -> Array<A, D>
where A: ComplexFloat,

Source

fn sigmoid_complex_derivative(&self) -> Array<A, D>
where A: ComplexFloat,

Source

fn softmax(&self) -> Array<A, D>
where A: ComplexFloat,

Source

fn softmax_axis(&self, axis: usize) -> Array<A, D>
where A: ComplexFloat, D: RemoveAxis,

Source

fn tanh(&self) -> Array<A, D>
where A: ComplexFloat,

Source

fn tanh_derivative(&self) -> Array<A, D>
where A: ComplexFloat,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, A, S, D> NdActivate<A, D> for &'a ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Data = S

Source§

fn activate<B, F>(&self, f: F) -> Array<B, D>
where F: Fn(A) -> B,

Source§

impl<'a, A, S, D> NdActivate<A, D> for &'a mut ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Data = S

Source§

fn activate<B, F>(&self, f: F) -> Array<B, D>
where F: Fn(A) -> B,

Source§

impl<A, S, D> NdActivate<A, D> for ArrayBase<S, D>
where A: ScalarOperand, D: Dimension, S: Data<Elem = A>,

Source§

type Data = S

Source§

fn activate<B, F>(&self, f: F) -> Array<B, D>
where F: Fn(A) -> B,

Implementors§