Closed zcai0612 closed 1 year ago
Since you use the
if level != len(channel_mult) - 1: # will not go to this downsample branch in the last feature
in
UNet
, when initializing the trainer, the missingDownsample
module will be taken as an unexpected key.missing_keys, unexpected_keys = self.model.load_state_dict( state_dict["model"], strict=False ) assert unexpected_keys == []
The code will be wrong. I hope you'll get back to me if I have a wrong understanding.
Well, I propose this problem since I got it wrong in
missing_keys, unexpected_keys = self.model.load_state_dict( state_dict["model"], strict=False )
assert unexpected_keys == []
Now I know there is nothing wrong here, I will go for some other reasons. 😢
Since you use the
in
UNet
, when initializing the trainer, the missingDownsample
module will be taken as an unexpected key.The code will be wrong. I hope you'll get back to me if I have a wrong understanding.