pub trait ActivationOps {
// Required methods
fn binary_step(&self) -> Self;
fn sigmoid(&self) -> Self;
fn tanh(&self) -> Self;
fn relu(&self) -> Self;
fn leaky_relu(&self) -> Self;
fn parametric_relu(&self, a: f32) -> Self;
fn elu(&self, alpha: f32) -> Self;
fn softmax(&self, dim: usize) -> Self;
fn swish(&self) -> Self;
}Required Methods§
fn binary_step(&self) -> Self
fn sigmoid(&self) -> Self
fn tanh(&self) -> Self
fn relu(&self) -> Self
fn leaky_relu(&self) -> Self
fn parametric_relu(&self, a: f32) -> Self
fn elu(&self, alpha: f32) -> Self
fn softmax(&self, dim: usize) -> Self
fn swish(&self) -> 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.