class_docstr: Class for obtaining an Accuracy Matrix for the evaluation stream
class_docstr_tok: ["Class","for","obtaining","an","Accuracy","Matrix","for","the","evaluation","stream"]
docstr: Adds a new dimension to the accuracy matrix.
  
  :param new_length: The new dimension of the matrix. We assume a square
                      matrix
docstr_tok: ["Adds","a","new","dimension","to","the","accuracy","matrix",".",":","param","new_length",":","The","new","dimension","of","the","matrix",".","We","assume","a","square","matrix"]
code: def add_new_task(self, new_length):
      """Adds a new dimension to the accuracy matrix.
  
      :param new_length: The new dimension of the matrix. We assume a square
                          matrix
      """
      temp = self.matrix.clone()
      self.matrix = torch.zeros((new_length, new_length))
      self.matrix[: temp.size(0), : temp.size(1)] = temp
  
file_path: avalanche/avalanche/evaluation/metrics/acc_matrix.py
imports: import torch
  from typing import List
  from avalanche.evaluation import PluginMetric
  from avalanche.evaluation.metric_results import MetricValue, MetricResult
  from avalanche.evaluation.metrics.accuracy import Accuracy
  from avalanche.training.templates import SupervisedTemplate
label_desc: Use image node_id 4 for calling the AccuracyMatrixPluginMetric obj's underlying member method code with example usage: obj.add_new_task(new_length) without return types