[][src]Trait lfa::transforms::Transform

pub trait Transform<T: ?Sized> {
type Output;
    fn transform(&self, x: T) -> Self::Output;
fn grad(&self, x: T) -> T; }

An interface for differentiable transformations.

Associated Types

type Output

Loading content...

Required methods

fn transform(&self, x: T) -> Self::Output

Return the value of the transform for input x.

fn grad(&self, x: T) -> T

Return the gradient of the transform for input x.

Loading content...

Implementors

impl Transform<[f64; 2]> for Tanh[src]

type Output = [f64; 2]

impl Transform<[f64; 2]> for Identity[src]

type Output = [f64; 2]

impl Transform<[f64; 2]> for Softplus[src]

type Output = [f64; 2]

impl Transform<[f64; 2]> for LogSumExp[src]

type Output = f64

impl Transform<[f64; 2]> for Logistic[src]

type Output = [f64; 2]

impl Transform<[f64; 2]> for Exp[src]

type Output = [f64; 2]

impl Transform<[f64; 3]> for Tanh[src]

type Output = [f64; 3]

impl Transform<[f64; 3]> for Identity[src]

type Output = [f64; 3]

impl Transform<[f64; 3]> for Softplus[src]

type Output = [f64; 3]

impl Transform<[f64; 3]> for LogSumExp[src]

type Output = f64

impl Transform<[f64; 3]> for Logistic[src]

type Output = [f64; 3]

impl Transform<[f64; 3]> for Exp[src]

type Output = [f64; 3]

impl Transform<f64> for Tanh[src]

type Output = f64

impl Transform<f64> for Identity[src]

type Output = f64

impl Transform<f64> for Softplus[src]

type Output = f64

impl Transform<f64> for LogSumExp[src]

type Output = f64

impl Transform<f64> for Logistic[src]

type Output = f64

impl Transform<f64> for Exp[src]

type Output = f64

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for Tanh[src]

type Output = Vector<f64>

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for Identity[src]

type Output = Vector<f64>

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for Softplus[src]

type Output = Vector<f64>

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for LogSumExp[src]

type Output = f64

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for Logistic[src]

type Output = Vector<f64>

impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>> for Exp[src]

type Output = Vector<f64>

Loading content...