pub struct GaStack<'a> {
pub fold: usize,
pub dim: usize,
pub heads: usize,
pub proj: GaLin<'a>,
pub proj_t: GaLin<'a>,
pub residual_scales: &'a [f32],
pub input_scale: f32,
pub layers: Vec<GaLayer<'a>>,
}Expand description
One stack: with fold 2 its rows are pairs of frames ([⌈t/2⌉, 2·width],
an odd last frame paired with zeros), and the pairs are split back after
it. h = proj(x), bypass = residual_scales[0]·h, h ← input_scale·h,
after layer i bypass += residual_scales[i + 1]·h, and the stack gives
x + proj_t(bypass).
Fields§
§fold: usize§dim: usize§heads: usize§proj: GaLin<'a>§proj_t: GaLin<'a>§residual_scales: &'a [f32]§input_scale: f32§layers: Vec<GaLayer<'a>>Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GaStack<'a>
impl<'a> !UnwindSafe for GaStack<'a>
impl<'a> Forget for GaStack<'a>
impl<'a> Freeze for GaStack<'a>
impl<'a> Move for GaStack<'a>
impl<'a> Send for GaStack<'a>
impl<'a> Sync for GaStack<'a>
impl<'a> Unpin for GaStack<'a>
impl<'a> UnsafeUnpin for GaStack<'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