def _rescale_gradients(self, scale):
    for param in master_params(self.optimizer):
        if (param.grad is not None):
            param.grad.data.mul_(scale)
def _rescale_gradients(self, scale):
    for param in master_params(self.optimizer):
        if (param.grad is not None):
            param.grad.data.mul_(scale)