class_docstr: Is needed to give a roughly estimate of the anaphoricity of two candidates,
  only top scoring candidates are considered on later steps to reduce
  computational complexity.
docstr: Returns rough anaphoricity scores for candidates, which consist of
  the bilinear output of the current model summed with mention scores.
docstr_tok: ["Returns","rough","anaphoricity","scores","for","candidates",",","which","consist","of","the","bilinear","output","of","the","current","model","summed","with","mention","scores","."]
code: def forward(
      self,  # type: ignore  # pylint: disable=arguments-differ  #35566 in pytorch
      mentions: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """
      Returns rough anaphoricity scores for candidates, which consist of
      the bilinear output of the current model summed with mention scores.
      """
      # [n_mentions, n_mentions]
      pair_mask = torch.arange(mentions.shape[0])
      pair_mask = pair_mask.unsqueeze(1) - pair_mask.unsqueeze(0)
      pair_mask = torch.log((pair_mask > 0).to(torch.float))
      pair_mask = pair_mask.to(mentions.device)
  
      bilinear_scores = self.dropout(self.bilinear(mentions)).mm(
          mentions.T
      )
  
      rough_scores = pair_mask + bilinear_scores
  
      return self._prune(rough_scores)
  
imports: from typing import Tuple
  import torch
  from stanza.models.coref.config import Config
label_desc: Use image node_id 2 for calling the RoughScorer obj's underlying member method code with example usage: obj.forward(mentions) and returns: self