code: def __init__(self, model_name="ViT-B/32"):
      super().__init__()
      import clip
      from clip.simple_tokenizer import SimpleTokenizer
  
      self.tokenizer = SimpleTokenizer()
      pretrained_model, _ = clip.load(model_name, device="cpu")
      self.clip = pretrained_model
  
file_path: mmdetection/projects/Detic/detic/text_encoder.py
imports: from typing import List, Union
  import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new CLIPTextEncoder object from inherited base classes: nn with example: obj = CLIPTextEncoder(model_name)