pub struct VisionWeightBundle {
pub embed_dim: usize,
pub n_classes: usize,
pub proj: Vec<f32>,
pub head: LinearHead,
pub model_id: String,
pub content_hash: u64,
}Expand description
On-disk / in-memory vision weight bundle.
Fields§
§embed_dim: usize§n_classes: usize§proj: Vec<f32>Projects 16-d image features → embed_dim. Row-major [embed_dim * 16].
head: LinearHead§model_id: String§content_hash: u64Implementations§
Source§impl VisionWeightBundle
impl VisionWeightBundle
Sourcepub fn model_hash(&self) -> u64
pub fn model_hash(&self) -> u64
model hash.
Sourcepub fn from_seed(seed: u64, embed_dim: usize, class_iris: &[&str]) -> Self
pub fn from_seed(seed: u64, embed_dim: usize, class_iris: &[&str]) -> Self
Regenerable fixture weights from seed (tests + offline demo without external files).
Sourcepub fn from_bytes(
bytes: &[u8],
class_iris: &[&str],
) -> Result<Self, VisionError>
pub fn from_bytes( bytes: &[u8], class_iris: &[&str], ) -> Result<Self, VisionError>
Load QVWT from bytes. Class IRIs optional: if fewer names than n_classes, hashes from file used.
Trait Implementations§
Source§impl Clone for VisionWeightBundle
impl Clone for VisionWeightBundle
Auto Trait Implementations§
impl Freeze for VisionWeightBundle
impl RefUnwindSafe for VisionWeightBundle
impl Send for VisionWeightBundle
impl Sync for VisionWeightBundle
impl Unpin for VisionWeightBundle
impl UnsafeUnpin for VisionWeightBundle
impl UnwindSafe for VisionWeightBundle
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more