pub struct ViTModel {
pub config: ViTConfig,
pub patch_embed: PatchEmbed,
pub pos_embed: LearnablePosEmbed,
pub encoder: ViTEncoder,
pub weights: ViTModelWeights,
}Expand description
Full Vision Transformer model.
Fields§
§config: ViTConfigTop-level model configuration.
patch_embed: PatchEmbedStrided conv2d patch embedder.
pos_embed: LearnablePosEmbedLearnable positional embeddings for seq_len positions (CLS + patches).
encoder: ViTEncoderTransformer encoder stack.
weights: ViTModelWeightsClassification head weights.
Implementations§
Auto Trait Implementations§
impl Freeze for ViTModel
impl RefUnwindSafe for ViTModel
impl Send for ViTModel
impl Sync for ViTModel
impl Unpin for ViTModel
impl UnsafeUnpin for ViTModel
impl UnwindSafe for ViTModel
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