class_docstr: Base class for multi-modal image-text data
code: def __init__(
      self,
      opts: argparse.Namespace,
      image_encoder: BaseImageEncoder,
      text_encoder: BaseTextEncoder,
      *args,
      **kwargs,
  ) -> None:
      super().__init__(opts=opts, *args, **kwargs)
      self.image_encoder: BaseImageEncoder = image_encoder
      self.text_encoder: BaseTextEncoder = text_encoder
      self.logit_scale = nn.Parameter(
          torch.ones([]) * math.log(1.0 / 0.07)
      )
      self.use_distributed = getattr(opts, "ddp.use_distributed", False)
      self.cache_text_features_zero_shot = getattr(
          opts,
          "model.multi_modal_image_text.clip.cache_text_features_zero_shot",
          False,
      )
      self.cached_text_features = None
      self.reset_parameters()
  
imports: import argparse
  import math
  from typing import Dict, Optional
  import torch
  from torch import Tensor, nn
  from cvnets.image_projection_layers import build_image_projection_head
  from cvnets.image_projection_layers.base_image_projection import get_in_feature_dimension
  from cvnets.models import MODEL_REGISTRY, BaseAnyNNModel, get_model
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.multi_modal_img_text.base_multi_modal_img_text import BaseMultiModalImageText
  from cvnets.text_encoders import BaseTextEncoder, build_text_encoder
  from utils import logger
label_desc: Use image node_id 1 to create a new CLIP object from inherited base classes: BaseMultiModalImageText with example: obj = CLIP(opts, image_encoder, text_encoder)