pub struct TrainState {
pub layers: Vec<usize>,
pub data: Vec<Vec<f32>>,
/* private fields */
}Expand description
Master copies + grads + AdamW moments of the trainable tensors.
Fields§
§layers: Vec<usize>§data: Vec<Vec<f32>>layers.len()·5 tensors, layer-major, [iln, pln, gate, up, down].
Implementations§
Auto Trait Implementations§
impl Freeze for TrainState
impl RefUnwindSafe for TrainState
impl Send for TrainState
impl Sync for TrainState
impl Unpin for TrainState
impl UnsafeUnpin for TrainState
impl UnwindSafe for TrainState
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