class_docstr: The standalone Forward Transfer metric.
  This metric returns the forward transfer relative to a specific key.
  Alternatively, this metric returns a dict in which each key is
  associated to the forward transfer.
  Forward transfer is computed as the difference between the value
  recorded for a specific key after the previous experience has
  been trained on, and random initialization before training.
  The value associated to a key can be updated with the `update` method.
  
  At initialization, this metric returns an empty dictionary.
class_docstr_tok: ["The","standalone","Forward","Transfer","metric",".","This","metric","returns","the","forward","transfer","relative","to","a","specific","key",".","Alternatively",",","this","metric","returns","a","dict","in","which","each","key","is","associated","to","the","forward","transfer",".","Forward","transfer","is","computed","as","the","difference","between","the","value","recorded","for","a","specific","key","after","the","previous","experience","has","been","trained","on",",","and","random","initialization","before","training",".","The","value","associated","to","a","key","can","be","updated","with","the","`","update","`","method",".","At","initialization",",","this","metric","returns","an","empty","dictionary","."]
docstr: Compute the forward transfer for a specific key.
  
  :param k: the key for which returning forward transfer.
  
  :return: the difference between the key value after training on the
      previous experience, and the key at random initialization.
      It returns None if k has not been updated at least twice.
docstr_tok: ["Compute","the","forward","transfer","for","a","specific","key",".",":","param","k",":","the","key","for","which","returning","forward","transfer",".",":","return",":","the","difference","between","the","key","value","after","training","on","the","previous","experience",",","and","the","key","at","random","initialization",".","It","returns","None","if","k","has","not","been","updated","at","least","twice","."]
code: def result_key(self, k: int) -> Optional[float]:
      """
      Compute the forward transfer for a specific key.
  
      :param k: the key for which returning forward transfer.
  
      :return: the difference between the key value after training on the
          previous experience, and the key at random initialization.
          It returns None if k has not been updated at least twice.
      """
      assert k is not None
  
      if k in self.previous:
          return self.previous[k] - self.initial[k]
      else:
          return None
  
imports: from abc import ABC, abstractmethod
  from typing import Dict, TYPE_CHECKING, Generic, List, Optional, TypeVar, Union
  from avalanche.evaluation.metric_definitions import Metric, PluginMetric
  from avalanche.evaluation.metric_results import MetricValue, MetricResult
  from avalanche.evaluation.metrics import TaskAwareAccuracy, Mean
  from avalanche.evaluation.metric_utils import get_metric_name, phase_and_task, stream_type
label_desc: Use image node_id 5 for calling the ForwardTransfer obj's underlying member method code with example usage: obj.result_key(k) and returns: unknown, None