how to fix the error in loading trained xxxx_E.pth: tensors size cant match ?
kelvennn opened this issue · comments
Kelvennn commented
I finetuned the classical SwinIR model, then load the xxxx_E.pth for testing.
I met that problem:
RuntimeError: Error(s) in loading state_dict for SwinIR:
size mismatch for layers.0.residual_group.blocks.1.attn_mask: copying a param with shape torch.Size([4, 64, 64]) from checkpoint, the shape in current m odel is torch.Size([64, 64, 64]).
how to fix it?