code: def forward(self, data1, data2, pred_head=True):
      embed1, embed2 = self.dis_encoder(data1, data2)
  
      if pred_head:
          if self.fuse_type == "add":
              pair_embed = embed1 + embed2
          elif self.fuse_type == "multiply":
              pair_embed = embed1 * embed2
          elif self.fuse_type == "concat":
              pair_embed = torch.cat((embed1, embed2), dim=1)
          elif self.fuse_type == "abs_diff":
              pair_embed = torch.abs(embed1 - embed2)
          elif self.fuse_type == "cos":
              embed1, embed2 = self.pred_head(embed1), self.pred_head(
                  embed2
              )
              prob = (1.0 + self.cos(embed1, embed2)) / 2.0
              return prob
  
          prob = self.pred_head(pair_embed)
          return prob
  
      else:
          return embed1, embed2
  
imports: import torch
  import torch.nn
  from .GMNET import GMNet
label_desc: Use image node_id 2 for calling the GraphMatching obj's underlying member method code with example usage: obj.forward(data1, data2, pred_head) and returns: prob, embed1,  embed2, prob