def in_domain(self, matrix):
        """
        Diagonal average
        Evaluate accuracy on the current task only
        """
        r, _ = matrix.shape
        res = [matrix[i, i] for i in range(r)]
        return sum(res) / r

        Diagonal average
        Evaluate accuracy on the current task only
        
avalanche/benchmarks/classic/clear.py