#[non_exhaustive]pub enum ModelVariant {
Blip(BlipForConditionalGeneration),
QuantizedBlip(BlipForConditionalGeneration),
}
Expand description
Represents different variants of image captioning models.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Blip(BlipForConditionalGeneration)
QuantizedBlip(BlipForConditionalGeneration)
Trait Implementations§
source§impl Clone for ModelVariant
impl Clone for ModelVariant
source§fn clone(&self) -> ModelVariant
fn clone(&self) -> ModelVariant
Returns a copy 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 ModelVariant
impl Debug for ModelVariant
source§impl Module for ModelVariant
impl Module for ModelVariant
source§fn forward(&self, xs: &Tensor) -> Result<Tensor>
fn forward(&self, xs: &Tensor) -> Result<Tensor>
Performs a forward pass for the vision model.
This function takes an input tensor, passes it through the vision model, and returns the resulting tensor.
§Arguments
xs
- A reference to the input tensor to be processed by the vision model.
§Returns
A Result
containing the output tensor if the forward pass is successful, or an error if
the forward pass fails.
§Errors
Returns an error if the vision model’s forward pass encounters any issues.
Auto Trait Implementations§
impl Freeze for ModelVariant
impl !RefUnwindSafe for ModelVariant
impl Send for ModelVariant
impl Sync for ModelVariant
impl Unpin for ModelVariant
impl !UnwindSafe for ModelVariant
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request