code: def get_similarity(self, image, text):
      image_features = self.encode_image(image)
      text_features = self.encode_text(text)
  
      # normalized features
      image_features = image_features / image_features.norm(
          axis=1, keepdim=True
      )
      text_features = text_features / text_features.norm(
          axis=1, keepdim=True
      )
  
      # cosine similarity as logits
      logit_scale = self.logit_scale.exp()
      logits_per_image = (
          logit_scale * image_features @ text_features.t()
      )
      logits_per_text = logits_per_image.t()
  
      # shape = [global_batch_size, global_batch_size]
      return logits_per_image, logits_per_text
  
imports: from collections import OrderedDict
  from typing import Tuple
  from typing import Union
  import numpy
  import paddle
  import paddle.nn.functional
  from disco_diffusion_cnclip_vitb16.cn_clip.clip import _tokenizer
  from disco_diffusion_cnclip_vitb16.cn_clip.clip.configuration_bert import BertConfig
  from disco_diffusion_cnclip_vitb16.cn_clip.clip.modeling_bert import BertModel
  from paddle import nn
  from paddle.nn import MultiHeadAttention
label_desc: Use image node_id 6 for calling the CLIP obj's underlying member method code with example usage: obj.get_similarity(image, text) and returns: logits_per_image,  logits_per_text