def forward_transfer(self, matrix):
        """
        Upper trianglar average
        Evaluate generalization to all future task
        """
        r, _ = matrix.shape
        res = [matrix[i, j] for i in range(r) for j in range(i + 1, r)]
        return sum(res) / len(res)

        Upper trianglar average
        Evaluate generalization to all future task
        
avalanche/benchmarks/classic/clear.py