pub struct Qi21VaeResRef<'a> {
pub g1: &'a [f32],
pub c1: Qi21VaeConvRef<'a>,
pub g2: &'a [f32],
pub c2: Qi21VaeConvRef<'a>,
pub shortcut: Option<Qi21VaeConvRef<'a>>,
}Expand description
A residual block: conv2(φ(conv1(φ(x)))) + x (through the 1×1
shortcut when ci ≠ co), φ = RMS_norm over channels (x/‖x‖·√C·γ), SiLU.
Fields§
§g1: &'a [f32]§c1: Qi21VaeConvRef<'a>§g2: &'a [f32]§c2: Qi21VaeConvRef<'a>§shortcut: Option<Qi21VaeConvRef<'a>>Auto Trait Implementations§
impl<'a> Freeze for Qi21VaeResRef<'a>
impl<'a> RefUnwindSafe for Qi21VaeResRef<'a>
impl<'a> Send for Qi21VaeResRef<'a>
impl<'a> Sync for Qi21VaeResRef<'a>
impl<'a> Unpin for Qi21VaeResRef<'a>
impl<'a> UnsafeUnpin for Qi21VaeResRef<'a>
impl<'a> UnwindSafe for Qi21VaeResRef<'a>
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