class_docstr: Test CLIP model
code: def test_clip(self):
      img = torch.rand(1, 3, 4, 4).to(self.device)
      text = torch.randint(high=49408, size=(2, 77), dtype=torch.int32)
      model = clip.create_model(
          embed_dim=512,
          image_resolution=4,
          vision_layers=12,
          vision_width=768,
          vision_patch_size=2,
          context_length=77,
          vocab_size=49408,
          transformer_width=512,
          transformer_heads=8,
          transformer_layers=12,
          device=self.device,
      )
      image_features = model.encode_image(img)
      text_features = model.encode_text(text, device=self.device)
      self.assertEqual(image_features.shape, (1, 512))
      self.assertEqual(text_features.shape, (2, 512))
  
      logits_per_img, logits_per_text = model(img, text)
      self.assertEqual(logits_per_img.shape, (1, 2))
      self.assertEqual(logits_per_text.shape, (2, 1))
  
imports: import unittest
  import torch
  from towhee.models import clip
label_desc: Use image node_id 1 for calling the TestClip obj's underlying member method code with example usage: obj.test_clip() without return types