pub struct ClipConfig {
pub hidden_size: usize,
pub num_layers: usize,
pub num_attention_heads: usize,
pub ffn_hidden_size: usize,
pub image_size: usize,
pub patch_size: usize,
pub use_flash_attn: bool,
pub layernorm_epsilon: f32,
pub dropout: f32,
}Fields§
§num_layers: usize§num_attention_heads: usize§image_size: usize§patch_size: usize§use_flash_attn: bool§layernorm_epsilon: f32§dropout: f32Implementations§
Source§impl ClipConfig
impl ClipConfig
pub fn base() -> Self
pub fn large() -> Self
pub fn with_image_size(self, size: usize) -> Self
pub fn with_flash_attn(self, enable: bool) -> Self
pub fn num_patches(&self) -> usize
pub fn num_positions(&self) -> usize
Trait Implementations§
Source§impl Clone for ClipConfig
impl Clone for ClipConfig
Source§fn clone(&self) -> ClipConfig
fn clone(&self) -> ClipConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ClipConfig
impl Debug for ClipConfig
Source§impl Default for ClipConfig
impl Default for ClipConfig
Source§impl<'de> Deserialize<'de> for ClipConfig
impl<'de> Deserialize<'de> for ClipConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ClipConfig
impl RefUnwindSafe for ClipConfig
impl Send for ClipConfig
impl Sync for ClipConfig
impl Unpin for ClipConfig
impl UnwindSafe for ClipConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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