code: def forward(self, src, dsts):
      # src [b, 1]
      # dsts [b, 1+neg]
  
      src_embed = self.emb(src)
      dsts_embed = self.emb(dsts)
  
      pos_embed = dsts_embed[:, 0:1]
      neg_embed = dsts_embed[:, 1:]
  
      pos_logits = paddle.matmul(
          src_embed, pos_embed, transpose_y=True
      )  # [batch_size, 1, 1]
  
      neg_logits = paddle.matmul(
          src_embed, neg_embed, transpose_y=True
      )  # [batch_size, 1, neg_num]
  
      ones_label = paddle.ones_like(pos_logits)
      pos_loss = self.loss(pos_logits, ones_label)
  
      zeros_label = paddle.zeros_like(neg_logits)
      neg_loss = self.loss(neg_logits, zeros_label)
  
      loss = (pos_loss + neg_loss) / 2
      return loss
  
file_path: PGL/examples/graph_based_clustering_demo/model.py
imports: import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the SkipGramModel obj's underlying member method code with example usage: obj.forward(src, dsts) and returns: loss