Should anyone explain why here clone() used?

  
      github.com
  
  
    HuangxingLin123/Learning-Rate-Dropout/blob/master/cifar10/adam_lrd.py#L79

        #     # Use the max. for normalizing running avg. of gradient
        #     denom = max_exp_avg_sq.sqrt().add_(group['eps'])
        # else:
        denom = exp_avg_sq.sqrt().add_(group['eps'])

        bias_correction1 = 1 - beta1 ** state['step']
        bias_correction2 = 1 - beta2 ** state['step']
        step_size = group['lr'] * math.sqrt(bias_correction2) / bias_correction1

        ##dropout learning rate
        lr_dropout = step_size / denom.clone()
        lr_dropout=lr_dropout * mask

        p.data.addcmul_(-1, exp_avg, lr_dropout)

        # p.data.addcdiv_(-step_size, exp_avg2, denom)

return loss



  
  
    
    
  
  


Whats general rule about it?
As far as I understand, this command copies the variable, in case I later modify it.
But in this case, this variable is not used further.
Is this an error in the code?