pub struct ClipVisionConfig {
pub vit_config: ViTConfig,
}Expand description
Configuration for the CLIP vision encoder.
Wraps a ViTConfig so that CLIP can share the same architectural
hyper-parameter vocabulary as a standalone ViT model.
Fields§
§vit_config: ViTConfigUnderlying ViT hyper-parameters (image size, patch size, depth, …).
Implementations§
Source§impl ClipVisionConfig
impl ClipVisionConfig
Sourcepub fn new(vit_config: ViTConfig) -> Self
pub fn new(vit_config: ViTConfig) -> Self
Create a ClipVisionConfig from an existing ViTConfig.
Sourcepub fn tiny() -> Self
pub fn tiny() -> Self
Convenience constructor for a tiny CLIP encoder suitable for tests.
Delegates to ViTConfig::tiny.
Trait Implementations§
Source§impl Clone for ClipVisionConfig
impl Clone for ClipVisionConfig
Source§fn clone(&self) -> ClipVisionConfig
fn clone(&self) -> ClipVisionConfig
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 moreAuto Trait Implementations§
impl Freeze for ClipVisionConfig
impl RefUnwindSafe for ClipVisionConfig
impl Send for ClipVisionConfig
impl Sync for ClipVisionConfig
impl Unpin for ClipVisionConfig
impl UnsafeUnpin for ClipVisionConfig
impl UnwindSafe for ClipVisionConfig
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