def __init__(self, top_k):
        """
        Creates an instance of the ExperienceTopkAccuracy metric.
        """
        super(ExperienceTopkAccuracy, self).__init__(
            reset_at="experience",
            emit_at="experience",
            mode="eval",
            top_k=top_k,
        )
        self.top_k = top_k

        Creates an instance of the ExperienceTopkAccuracy metric.
        
avalanche/evaluation/metrics/topk_acc.py