class_docstr: The minibatch loss metric.
  This plugin metric only works at training time.
  
  This metric computes the average loss over patterns
  from a single minibatch.
  It reports the result after each iteration.
  
  If a more coarse-grained logging is needed, consider using
  :class:`EpochLoss` instead.
class_docstr_tok: ["The","minibatch","loss","metric",".","This","plugin","metric","only","works","at","training","time",".","This","metric","computes","the","average","loss","over","patterns","from","a","single","minibatch",".","It","reports","the","result","after","each","iteration",".","If","a","more","coarse-grained","logging","is","needed",",","consider","using",":","class",":","`","EpochLoss","`","instead","."]
code: def __str__(self):
      return "Loss_MB"
  
imports: from typing import List, Dict
  import torch
  from torch import Tensor
  from avalanche.evaluation import PluginMetric, Metric, GenericPluginMetric
  from avalanche.evaluation.metrics.mean import Mean
  from avalanche.evaluation.metric_utils import phase_and_task
  from collections import defaultdict
label_desc: Use image node_id 2 for calling the MinibatchLoss obj's underlying member method code with example usage: obj.__str__() and returns: str