data
CLIPZeroShotOutput
extends
ModelOutputCLIPZeroShotOutput(logits: Tensor, image_embeds: Tensor, text_embeds: Tensor)What CLIPForZeroShotImageClassification returns.
Attributes
Examples
>>> import lucid
>>> from lucid.models.multimodal.clip._model import CLIPZeroShotOutput
>>> out = CLIPZeroShotOutput(
... logits=lucid.zeros(2, 10),
... image_embeds=lucid.zeros(2, 512),
... text_embeds=lucid.zeros(10, 512),
... )
>>> out.logits.shape
(2, 10)
Ten classes because ten prompts were embedded, not because anything
was trained on ten: the class list is whatever text was handed in.