pub struct SamPreprocessWeights {
pub patch_proj_w: Vec<f32>,
pub patch_proj_b: Vec<f32>,
pub pos_embed: Option<Vec<f32>>,
pub embed_dim: usize,
pub hw: usize,
}Expand description
Weights extracted from the safetensors checkpoint that the host uses before the encoder graph runs.
Fields§
§patch_proj_w: Vec<f32>Patch projection weight [E, 3, 16, 16] flattened+transposed to
[3·16·16, E] for row-major sgemm.
patch_proj_b: Vec<f32>Patch projection bias [E].
pos_embed: Option<Vec<f32>>Optional absolute positional embedding [1, hw, hw, E]
flattened to [hw · hw · E]. Added to the patch embeddings
before they enter the IR graph.
embed_dim: usize§hw: usizeAuto Trait Implementations§
impl Freeze for SamPreprocessWeights
impl RefUnwindSafe for SamPreprocessWeights
impl Send for SamPreprocessWeights
impl Sync for SamPreprocessWeights
impl Unpin for SamPreprocessWeights
impl UnsafeUnpin for SamPreprocessWeights
impl UnwindSafe for SamPreprocessWeights
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
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