pub struct WeightBlob {
pub magic: u32,
pub version: u32,
pub dims: Vec<u32>,
pub data: Vec<f32>,
}Expand description
A parsed learned-head weight blob. Cold-path owned (Vec); heads borrow it during inference.
Fields§
§magic: u32§version: u32§dims: Vec<u32>Logical tensor shape(s) — interpretation is head-specific (e.g. [classes, features]).
data: Vec<f32>Flat weight payload (row-major per head convention).
Implementations§
Source§impl WeightBlob
impl WeightBlob
Sourcepub fn dim_product(&self) -> usize
pub fn dim_product(&self) -> usize
Product of dims (saturating). Heads use this to validate data length against shape.
Trait Implementations§
Source§impl Clone for WeightBlob
impl Clone for WeightBlob
Source§impl Debug for WeightBlob
impl Debug for WeightBlob
Source§impl PartialEq for WeightBlob
impl PartialEq for WeightBlob
impl StructuralPartialEq for WeightBlob
Auto Trait Implementations§
impl Freeze for WeightBlob
impl RefUnwindSafe for WeightBlob
impl Send for WeightBlob
impl Sync for WeightBlob
impl Unpin for WeightBlob
impl UnsafeUnpin for WeightBlob
impl UnwindSafe for WeightBlob
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