class_docstr: CLIP is a recent model by OpenAI.
  
  Attributes:
      model_path: ViT-B/32, RN50, RN101, RN50x4
      init_model: initialise model from model_path
      init_tokenizer: initializes tokenizer
      name: string identifier for the model. Lowercase letters and numbers.
          No spaces/special characters except dashes.
      description: String description of the model.
      tasks: List of supported task strings
      details: Dictionary of additional details about the model
      device: Device for model. Defaults to "cuda" if available.
class_docstr_tok: ["CLIP","is","a","recent","model","by","OpenAI",".","Attributes",":","model_path",":","ViT-B\/32",",","RN50",",","RN101",",","RN50x4","init_model",":","initialise","model","from","model_path","init_tokenizer",":","initializes","tokenizer","name",":","string","identifier","for","the","model",".","Lowercase","letters","and","numbers",".","No","spaces\/special","characters","except","dashes",".","description",":","String","description","of","the","model",".","tasks",":","List","of","supported","task","strings","details",":","Dictionary","of","additional","details","about","the","model","device",":","Device","for","model",".","Defaults","to","``","cuda","''","if","available","."]
code: def image_classification(
      self,
      image: torch.TensorType,
      text: torch.TensorType,
      labels,
      top_k=10000,
  ):
      probabilities = []
      inputs = zip(image, text, labels)
  
      for image, text, labels in inputs:
          logits_per_image, logits_per_text = self.model(image, text)
  
          probs = logits_per_image.softmax(dim=-1)
          probs = probs.tolist()[0]
  
          label_probs = zip(labels, probs)
          label_probs = {lp[0]: lp[1] for lp in label_probs}
          label_probs = sorted(
              label_probs.items(), key=lambda x: x[1], reverse=True
          )
          label_probs = {k: v for k, v in label_probs[:top_k]}
  
          probabilities.append(label_probs)
  
      return probabilities
  
imports: import torch
  import torch.nn.functional
  from torch.utils.data.sampler import Sampler
  import pytorch_lightning
  import numpy
  from PIL import Image
  from typing import Union, List, Dict
  from functools import partial
  from .None import clip, simple_tokenizer
  from backprop.models import BaseModel
  from backprop.utils import ImageTextGroupDataset, base64_to_img
  from backprop.utils.losses import TripletLoss
  from io import BytesIO
  import base64
  import random
  from torch.utils.data.dataloader import DataLoader
  import os
label_desc: Use image node_id 6 for calling the CLIP obj's underlying member method code with example usage: obj.image_classification(image, text, labels, top_k) and returns: probabilities