pub struct VisionPreprocessWeights {
pub proj_w: Vec<f32>,
pub proj_w_cols: usize,
pub proj_b: Vec<f32>,
pub cls_token: Vec<f32>,
pub pos_embed: Vec<f32>,
}Expand description
Preprocessing weights extracted from safetensors for the caller to assemble the “hidden” input before graph execution.
Fields§
§proj_w: Vec<f32>Patch projection weight [patch_dim, H] (pre-transposed for sgemm)
proj_w_cols: usizeNumber of columns in proj_w (= hidden_size)
proj_b: Vec<f32>Patch projection bias [H]
cls_token: Vec<f32>CLS token [H] (or [1, 1, H] flattened)
pos_embed: Vec<f32>Position embeddings [1+np, H] (or [1, 1+np, H] flattened)
Auto Trait Implementations§
impl Freeze for VisionPreprocessWeights
impl RefUnwindSafe for VisionPreprocessWeights
impl Send for VisionPreprocessWeights
impl Sync for VisionPreprocessWeights
impl Unpin for VisionPreprocessWeights
impl UnsafeUnpin for VisionPreprocessWeights
impl UnwindSafe for VisionPreprocessWeights
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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