class_docstr: A very general abstract class representing a metric which can be
  accumulated.
docstr: # Parameters
  
  predictions : `torch.Tensor`, required.
      A tensor of predictions.
  gold_labels : `torch.Tensor`, required.
      A tensor corresponding to some gold label to evaluate against.
  mask : `torch.BoolTensor`, optional (default = `None`).
      A mask can be passed, in order to deal with metrics which are
      computed over potentially padded elements, such as sequence labels.
code: def __call__(
      self,
      predictions: torch.Tensor,
      gold_labels: torch.Tensor,
      mask: Optional[torch.BoolTensor],
  ):
      """
      # Parameters
  
      predictions : `torch.Tensor`, required.
          A tensor of predictions.
      gold_labels : `torch.Tensor`, required.
          A tensor corresponding to some gold label to evaluate against.
      mask : `torch.BoolTensor`, optional (default = `None`).
          A mask can be passed, in order to deal with metrics which are
          computed over potentially padded elements, such as sequence labels.
      """
      raise NotImplementedError
  
file_path: allennlp/allennlp/training/metrics/metric.py
imports: from typing import Iterable, Optional
  import torch
  from allennlp.common.registrable import Registrable
label_desc: Use image node_id 1 for calling the Metric obj's underlying member method code with example usage: obj.__call__(predictions, gold_labels, mask) without return types