I followed this link. This should be helpful

  
      
      github.com
  
  
    

Pytorch_lightning module : can't set attribute error · Discussion #7525 ·... 1.1k

//github.com/PyTorchLightning/pytorch-lightning/discussions/7525