Hi, I meet a problem that lightning will save my metric parameters and make pytorch cannot load weights directly, how can I exlude it?
Below is my code and
class IAT_enhancement(L.LightningModule):
def __init__(self,blk_size,lr,weight_decay):
super().__init__()
self.model = MyModel()
self.SSIM = StructuralSimilarityIndexMeasure(data_range=1.0)
self.PSNR = PeakSignalNoiseRatio(data_range=1.0)
self.LPIPs = LearnedPerceptualImagePatchSimilarity(net_type='squeeze')
Lightning output:
| Name | Type | Params
----------------------------------------------------------------
0 | model | MyModel | 729 K
1 | SSIM | StructuralSimilarityIndexMeasure | 0
2 | PSNR | PeakSignalNoiseRatio | 0
3 | LPIPs | LearnedPerceptualImagePatchSimilarity | 724 K
----------------------------------------------------------------
731 K Trainable params
722 K Non-trainable params
1.5 M Total params
5.815 Total estimated model params size (MB)
1 post - 1 participant