pub trait SigmoidPointwise<F>: NN<F> {
    // Required methods
    fn sigmoid_pointwise(&self, x: &mut SharedTensor<F>) -> Result<(), Error>;
    fn sigmoid_pointwise_grad(
        &self,
        x: &SharedTensor<F>,
        x_diff: &mut SharedTensor<F>
    ) -> Result<(), Error>;
}
Expand description

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

Required Methods§

source

fn sigmoid_pointwise(&self, x: &mut SharedTensor<F>) -> Result<(), Error>

Computes the [Sigmoid function][sigmoid] over the input Tensor x. [sigmoid]: https://en.wikipedia.org/wiki/Sigmoid_function

Saves the result back to x.

For a no-memory managed version see sigmoid_pointwise_plain.

source

fn sigmoid_pointwise_grad( &self, x: &SharedTensor<F>, x_diff: &mut SharedTensor<F> ) -> Result<(), Error>

Computes the gradient of a [Sigmoid function][sigmoid] over the input Tensor x. [sigmoid]: https://en.wikipedia.org/wiki/Sigmoid_function

Saves the result back to x_diff.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SigmoidPointwise<f32> for Backend<Native>

source§

impl SigmoidPointwise<f64> for Backend<Native>

source§

impl<T> SigmoidPointwise<T> for Backend<Cuda>
where T: Float + Default + DataTypeInfo,

source§

fn sigmoid_pointwise(&self, x: &mut SharedTensor<T>) -> Result<(), Error>

source§

fn sigmoid_pointwise_grad( &self, x: &SharedTensor<T>, x_diff: &mut SharedTensor<T> ) -> Result<(), Error>

Implementors§