Trait coaster_nn::Sigmoid [] [src]

pub trait Sigmoid<F>: NN<F> {
    fn sigmoid(
        &self,
        x: &SharedTensor<F>,
        result: &mut SharedTensor<F>
    ) -> Result<(), Error>; fn sigmoid_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 Sigmoid operations.

Required Methods

Computes the Sigmoid function over the input Tensor x.

Saves the result to result.

Computes the gradient of a Sigmoid function over the input Tensor x.

Saves the result to result_diff.

Implementors