class_docstr: Build similarity matrix for TransRAC
code: def __init__(self, num_heads=4, input_dim=512, model_dim=512):
      super().__init__()
  
      # self.dim_per_head = model_dim // num_heads
      self.num_heads = num_heads
      self.model_dim = model_dim
      self.input_size = input_dim
      self.linear_q = nn.Linear(self.input_size, model_dim)
      self.linear_k = nn.Linear(self.input_size, model_dim)
      self.linear_v = nn.Linear(self.input_size, model_dim)
  
      self.attention = Attention(att_dropout=0.0)
  
file_path: towhee/towhee/models/transrac/utils.py
imports: from torch import nn
  from towhee.models.layers.attention import Attention
label_desc: Use image node_id 1 to create a new SimilarityMatrix object from inherited base classes: nn with example: obj = SimilarityMatrix(num_heads, input_dim, model_dim)