class_docstr: Just checks batch-equality of two tensors and computes an accuracy metric based on that.  This
  is similar to :class:`CategoricalAccuracy`, if you've already done a ``.max()`` on your
  predictions.  If you have categorical output, though, you should typically just use
  :class:`CategoricalAccuracy`.  The reason you might want to use this instead is if you've done
  some kind of constrained inference and don't have a prediction tensor that matches the API of
  :class:`CategoricalAccuracy`, which assumes a final dimension of size ``num_classes``.
code: def __init__(self):
      self._correct_count = 0.0
      self._total_count = 0.0
  
file_path: magnitude/pymagnitude/third_party/allennlp/training/metrics/boolean_accuracy.py
imports: from __future__ import division
  from __future__ import absolute_import
  import torch
  from allennlp.training.metrics.metric import Metric
label_desc: Use image node_id 1 to create a new BooleanAccuracy object from inherited base classes: Metric with example: obj = BooleanAccuracy()