class_docstr: Calculates anaphoricity scores by passing the inputs into a FFNN 
docstr: Builds a pairwise matrix, scores the pairs and returns the scores.
  
  Args:
      all_mentions (torch.Tensor): [n_mentions, mention_emb]
      mentions_batch (torch.Tensor): [batch_size, mention_emb]
      pw_batch (torch.Tensor): [batch_size, n_ants, pw_emb]
      top_indices_batch (torch.Tensor): [batch_size, n_ants]
      top_rough_scores_batch (torch.Tensor): [batch_size, n_ants]
  
  Returns:
      torch.Tensor [batch_size, n_ants + 1]
          anaphoricity scores for the pairs + a dummy column
docstr_tok: ["Builds","a","pairwise","matrix",",","scores","the","pairs","and","returns","the","scores",".","Args",":","all_mentions","(","torch.Tensor",")",":","[","n_mentions",",","mention_emb","]","mentions_batch","(","torch.Tensor",")",":","[","batch_size",",","mention_emb","]","pw_batch","(","torch.Tensor",")",":","[","batch_size",",","n_ants",",","pw_emb","]","top_indices_batch","(","torch.Tensor",")",":","[","batch_size",",","n_ants","]","top_rough_scores_batch","(","torch.Tensor",")",":","[","batch_size",",","n_ants","]","Returns",":","torch.Tensor","[","batch_size",",","n_ants","+","1","]","anaphoricity","scores","for","the","pairs","+","a","dummy","column"]
code: def forward(
      self,
      *,  # type: ignore  # pylint: disable=arguments-differ  #35566 in pytorch
      all_mentions: torch.Tensor,
      mentions_batch: torch.Tensor,
      pw_batch: torch.Tensor,
      top_indices_batch: torch.Tensor,
      top_rough_scores_batch: torch.Tensor,
  ) -> torch.Tensor:
      """Builds a pairwise matrix, scores the pairs and returns the scores.
  
      Args:
          all_mentions (torch.Tensor): [n_mentions, mention_emb]
          mentions_batch (torch.Tensor): [batch_size, mention_emb]
          pw_batch (torch.Tensor): [batch_size, n_ants, pw_emb]
          top_indices_batch (torch.Tensor): [batch_size, n_ants]
          top_rough_scores_batch (torch.Tensor): [batch_size, n_ants]
  
      Returns:
          torch.Tensor [batch_size, n_ants + 1]
              anaphoricity scores for the pairs + a dummy column
      """
      # [batch_size, n_ants, pair_emb]
      pair_matrix = self._get_pair_matrix(
          all_mentions, mentions_batch, pw_batch, top_indices_batch
      )
  
      # [batch_size, n_ants]
      scores = top_rough_scores_batch + self._ffnn(pair_matrix)
      scores = utils.add_dummy(scores, eps=True)
  
      return scores
  
file_path: stanza/stanza/models/coref/anaphoricity_scorer.py
imports: import torch
  from stanza.models.coref import utils
  from stanza.models.coref.config import Config
label_desc: Use image node_id 2 for calling the AnaphoricityScorer obj's underlying member method code with example usage: obj.forward() and returns: scores