avalanche.evaluation.metrics.topk_acc_metrics

avalanche.evaluation.metrics.topk_acc_metrics(*, top_k=3, minibatch=False, epoch=False, epoch_running=False, experience=False, trained_experience=False, stream=False) List[PluginMetric][source]

Helper method that can be used to obtain the desired set of plugin metrics.

Parameters:
  • minibatch – If True, will return a metric able to log the minibatch top-k accuracy at training time.

  • epoch – If True, will return a metric able to log the epoch top-k accuracy at training time.

  • epoch_running – If True, will return a metric able to log the running epoch top-k accuracy at training time.

  • experience – If True, will return a metric able to log the top-k accuracy on each evaluation experience.

  • trained_experience – If True, will return a metric able to log the average evaluation top-k accuracy only for experiences that the model has been trained on

  • stream – If True, will return a metric able to log the top-k accuracy averaged over the entire evaluation stream of experiences.

Returns:

A list of plugin metrics.