def __init__(self, top_k):
        """
        Creates an instance of the TrainedExperienceTopkAccuracy metric.
        """
        super(TrainedExperienceTopkAccuracy, self).__init__(
            reset_at="stream", emit_at="stream", mode="eval", top_k=top_k
        )
        self._current_experience = 0
        self.top_k = top_k

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