Trait coaster_nn::Softmax [] [src]

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

Provides the functionality for a Backend to support Softmax operations.

Required Methods

Computes a Softmax over the input Tensor x.

Saves the result to result.

Computes the gradient of a Softmax over the input Tensor x.

Saves the result to result_diff.

Implementors