pub struct ViTBlockConfig {
pub embed_dim: usize,
pub n_heads: usize,
pub mlp_ratio: usize,
}Expand description
Configuration for a single ViT transformer block.
Fields§
§embed_dim: usizeToken embedding dimension.
n_heads: usizeNumber of attention heads. Must divide embed_dim.
mlp_ratio: usizeMLP hidden-dim multiplier: mlp_dim = mlp_ratio * embed_dim.
Implementations§
Source§impl ViTBlockConfig
impl ViTBlockConfig
Trait Implementations§
Source§impl Clone for ViTBlockConfig
impl Clone for ViTBlockConfig
Source§fn clone(&self) -> ViTBlockConfig
fn clone(&self) -> ViTBlockConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViTBlockConfig
impl Debug for ViTBlockConfig
Source§impl PartialEq for ViTBlockConfig
impl PartialEq for ViTBlockConfig
Source§fn eq(&self, other: &ViTBlockConfig) -> bool
fn eq(&self, other: &ViTBlockConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ViTBlockConfig
Auto Trait Implementations§
impl Freeze for ViTBlockConfig
impl RefUnwindSafe for ViTBlockConfig
impl Send for ViTBlockConfig
impl Sync for ViTBlockConfig
impl Unpin for ViTBlockConfig
impl UnsafeUnpin for ViTBlockConfig
impl UnwindSafe for ViTBlockConfig
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