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§
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>
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§
impl<T: Float + GenericBlas + MatrixMultiply> SoftmaxOps<T> for CPU
Available on crate feature
cpu only.impl<T: GenericBlas + MatrixMultiply + Float> SoftmaxOps<T> for OpenCL
Available on crate feature
opencl only.