pub struct GeluForwardDispatch;Expand description
Forward: y = x / (1 + exp(-2 * c * (x + a*x³))) where c = sqrt(2/pi), a = 0.044715 — the tanh GELU approximation.
Implementations§
Source§impl GeluForwardDispatch
impl GeluForwardDispatch
Sourcepub const SUPPORTED_DTYPES: &'static [DtypeRepr]
pub const SUPPORTED_DTYPES: &'static [DtypeRepr]
Dtypes this kernel declares support for.
Auto Trait Implementations§
impl Freeze for GeluForwardDispatch
impl RefUnwindSafe for GeluForwardDispatch
impl Send for GeluForwardDispatch
impl Sync for GeluForwardDispatch
impl Unpin for GeluForwardDispatch
impl UnsafeUnpin for GeluForwardDispatch
impl UnwindSafe for GeluForwardDispatch
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