def gradients(self, grads, trainable_variables):
        """Gets the gradients for the apply step."""
        if not self.built:
            self.build(trainable_variables)
        acc_grads = self._get_acc_grads(trainable_variables)
        grads = [(g + acc_g) / self._ga_steps for g, acc_g in zip(grads, acc_grads)]
        return grads
Gets the gradients for the apply step.
tensorflow_asr/optimizers/accumulation.py