Trait coaster_nn::TanhPointwise [] [src]

pub trait TanhPointwise<F>: NN<F> {
    fn tanh_pointwise(&self, x: &mut SharedTensor<F>) -> Result<(), Error>;
    fn tanh_pointwise_grad(
        &self,
        x: &SharedTensor<F>,
        x_diff: &mut SharedTensor<F>
    ) -> Result<(), Error>; }

Provides the functionality for pointwise ReLU operations (overwrites the input with the result of the operation).

Required Methods

Computes the hyperbolic Tangent over the input Tensor x.

Saves the result back to x.

Computes the gradient of tanh over the input Tensor x.

Saves the result back to x_diff.

Implementors