def _track_gradient_norm(self):
    grad_norm_dict = {}
    if (((self.trainer.global_step + 1) % self.trainer.log_every_n_steps) == 0):
        if (float(self.trainer.track_grad_norm) > 0):
            model = self.trainer.lightning_module
            grad_norm_dict = grad_norm(model, self.trainer.track_grad_norm)
    return grad_norm_dict
def _track_gradient_norm(self):
    grad_norm_dict = {}
    if (((self.trainer.global_step + 1) % self.trainer.log_every_n_steps) == 0):
        if (float(self.trainer.track_grad_norm) > 0):
            model = self.trainer.lightning_module
            grad_norm_dict = grad_norm(model, self.trainer.track_grad_norm)
    return grad_norm_dict