Struct candle_transformers::models::clip::ClipModel
source · pub struct ClipModel { /* private fields */ }
Implementations§
source§impl ClipModel
impl ClipModel
pub fn new(vs: VarBuilder<'_>, c: &ClipConfig) -> Result<Self>
pub fn get_text_features(&self, input_ids: &Tensor) -> Result<Tensor>
pub fn get_image_features(&self, pixel_values: &Tensor) -> Result<Tensor>
pub fn forward( &self, pixel_values: &Tensor, input_ids: &Tensor ) -> Result<(Tensor, Tensor)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClipModel
impl !RefUnwindSafe for ClipModel
impl Send for ClipModel
impl Sync for ClipModel
impl Unpin for ClipModel
impl !UnwindSafe for ClipModel
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