Trait coaster_nn::ReluPointwise [] [src]

pub trait ReluPointwise<F>: NN<F> {
    fn relu_pointwise(&self, x: &mut SharedTensor<F>) -> Result<(), Error>;
    fn relu_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 Rectified linear units over the input Tensor x.

Saves the result back to x.

Computes the gradient of ReLU over the input Tensor x.

Saves the result back to x_diff.

Implementors