pub struct PromptEncoder { /* private fields */ }
Implementations§
source§impl PromptEncoder
impl PromptEncoder
pub fn new( embed_dim: usize, image_embedding_size: (usize, usize), input_image_size: (usize, usize), mask_in_chans: usize, vb: VarBuilder<'_> ) -> Result<Self>
pub fn get_dense_pe(&self) -> Result<Tensor>
pub fn forward( &self, points: Option<(&Tensor, &Tensor)>, boxes: Option<&Tensor>, masks: Option<&Tensor> ) -> Result<(Tensor, Tensor)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PromptEncoder
impl !RefUnwindSafe for PromptEncoder
impl Send for PromptEncoder
impl Sync for PromptEncoder
impl Unpin for PromptEncoder
impl !UnwindSafe for PromptEncoder
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