SoftmaxOps

Trait SoftmaxOps 

Source
pub trait SoftmaxOps<T, D: Device = Self>: Device {
    // Required methods
    fn softmax(&self, inputs: &Matrix<'_, T, D>) -> Matrix<'_, T, Self>;
    fn softmax_grad(
        &self,
        activated: &Matrix<'_, T, D>,
        grads: &Matrix<'_, T, D>,
    ) -> Matrix<'_, T, Self>;
}

Required Methods§

Source

fn softmax(&self, inputs: &Matrix<'_, T, D>) -> Matrix<'_, T, Self>

Source

fn softmax_grad( &self, activated: &Matrix<'_, T, D>, grads: &Matrix<'_, T, D>, ) -> Matrix<'_, T, Self>

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.

Implementors§

Source§

impl<T: Float + GenericBlas + MatrixMultiply> SoftmaxOps<T> for CPU
where CPU: ColOp<T>,

Available on crate feature cpu only.
Source§

impl<T: GenericBlas + MatrixMultiply + Float> SoftmaxOps<T> for OpenCL

Available on crate feature opencl only.