class_docstr: Accuracy metric. This is a standalone metric.
  
  The update method computes the accuracy incrementally
  by keeping a running average of the <prediction, target> pairs
  of Tensors provided over time.
  
  The "prediction" and "target" tensors may contain plain labels or
  one-hot/logit vectors.
  
  Each time `result` is called, this metric emits the average accuracy
  across all predictions made since the last `reset`.
  
  The reset method will bring the metric to its initial state. By default
  this metric in its initial state will return an accuracy value of 0.
class_docstr_tok: ["Accuracy","metric",".","This","is","a","standalone","metric",".","The","update","method","computes","the","accuracy","incrementally","by","keeping","a","running","average","of","the","<","prediction",",","target",">","pairs","of","Tensors","provided","over","time",".","The","``","prediction","''","and","``","target","''","tensors","may","contain","plain","labels","or","one-hot\/logit","vectors",".","Each","time","`","result","`","is","called",",","this","metric","emits","the","average","accuracy","across","all","predictions","made","since","the","last","`","reset","`",".","The","reset","method","will","bring","the","metric","to","its","initial","state",".","By","default","this","metric","in","its","initial","state","will","return","an","accuracy","value","of","0","."]
docstr: Creates an instance of the standalone Accuracy metric.
  
  By default this metric in its initial state will return an accuracy
  value of 0. The metric can be updated by using the `update` method
  while the running accuracy can be retrieved using the `result` method.
docstr_tok: ["Creates","an","instance","of","the","standalone","Accuracy","metric",".","By","default","this","metric","in","its","initial","state","will","return","an","accuracy","value","of","0",".","The","metric","can","be","updated","by","using","the","`","update","`","method","while","the","running","accuracy","can","be","retrieved","using","the","`","result","`","method","."]
code: def __init__(self):
      """Creates an instance of the standalone Accuracy metric.
  
      By default this metric in its initial state will return an accuracy
      value of 0. The metric can be updated by using the `update` method
      while the running accuracy can be retrieved using the `result` method.
      """
      self._mean_accuracy = Mean()
      """The mean utility that will be used to store the running accuracy."""
  
imports: from typing import List, Optional, Union, Dict
  import torch
  from torch import Tensor
  from avalanche.evaluation import Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from collections import defaultdict
label_desc: Use image node_id 1 to create a new Accuracy object from inherited base classes: Metric with example: obj = Accuracy()