def METHOD_NAME(self, src, dsts):
    # src [b, 1]
    # dsts [b, 1+neg]
    src_embed = self.emb(src)
    if self.shared_embedding:
        dsts_embed = self.emb(dsts)
    else:
        dsts_embed = self.v_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