SigmoidPointwise

Trait SigmoidPointwise 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§