def _reward_div(self, y_output: np.ndarray, n: int) -> float:
        """
        Compute `div` reward value.

        :param y_output: Output of the victim classifier.
        :param n: Current iteration.
        :return: Reward value.
        """
        # First update y_avg
        self.y_avg = self.y_avg + (1.0 / n) * (y_output[0] - self.y_avg)

        # Then compute reward
        reward = 0
        for k in range(self.estimator.nb_classes):
            reward += np.maximum(0, y_output[0][k] - self.y_avg[k])

        return reward

        Compute `div` reward value.

        :param y_output: Output of the victim classifier.
        :param n: Current iteration.
        :return: Reward value.
        
art/attacks/extraction/knockoff_nets.py