Trait coaster_nn::Tanh [] [src]

pub trait Tanh<F>: NN<F> {
    fn tanh(
        &self,
        x: &SharedTensor<F>,
        result: &mut SharedTensor<F>
    ) -> Result<(), Error>; fn tanh_grad(
        &self,
        x: &SharedTensor<F>,
        x_diff: &SharedTensor<F>,
        result: &SharedTensor<F>,
        result_diff: &mut SharedTensor<F>
    ) -> Result<(), Error>; }

Provides the functionality for a Backend to support TanH operations.

Required Methods

Computes the hyperbolic Tangent over the input Tensor x.

Saves the result to result.

Computes the gradient of hyperbolic Tangent over the input Tensor x.

Saves the result to result_diff.

Implementors