pub enum ActivationKind {
Relu,
Gelu,
Silu,
}Expand description
Activation functions implemented by the Bias*Activation
EpilogueKind variants. Surfaced for telemetry and selector
logic; the kernel selection itself is driven by the enum variant.
Intentionally NOT #[non_exhaustive] — paired with
EpilogueKind which is also left exhaustive. Adding a new
activation requires shipping a matching Bias<Activation> epilogue
kernel, which is a deliberate breaking-change event.
Variants§
Relu
relu(x) = max(x, 0).
Gelu
Exact (erf-based) Gaussian Error Linear Unit. Matches
PyTorch’s default nn.GELU().
Silu
silu(x) = x · sigmoid(x). Also known as Swish-1.
Trait Implementations§
Source§impl Clone for ActivationKind
impl Clone for ActivationKind
Source§fn clone(&self) -> ActivationKind
fn clone(&self) -> ActivationKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ActivationKind
Source§impl Debug for ActivationKind
impl Debug for ActivationKind
impl Eq for ActivationKind
Source§impl Hash for ActivationKind
impl Hash for ActivationKind
Source§impl PartialEq for ActivationKind
impl PartialEq for ActivationKind
Source§fn eq(&self, other: &ActivationKind) -> bool
fn eq(&self, other: &ActivationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ActivationKind
Auto Trait Implementations§
impl Freeze for ActivationKind
impl RefUnwindSafe for ActivationKind
impl Send for ActivationKind
impl Sync for ActivationKind
impl Unpin for ActivationKind
impl UnsafeUnpin for ActivationKind
impl UnwindSafe for ActivationKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more