Open XBSong opened 3 years ago
Oh,I meet the same issue
use code
ffa = None
gps = 3
blocks = 19
model_dir = '.../its_train_ffa_3_19.pk'
ckp=torch.load(model_dir, map_location = 'cuda')
ffa = FFA.FFA(gps = gps, blocks = blocks)
ckpt = ckp['model']
newckpt = {}
for k,v in ckpt.items():
k = (".").join(k.split(".")[1:])
newckpt[k] = v
ffa.load_state_dict(newckpt)
that's fine.
Hi, thank you for releasing the code and pre-trained models.
When I test the pre-trained model ('its_train_ffa_3_19.pk') downloaded from the released website, I got "loading state_dict for DataParallel: Unexpected key(s) in state_dict: "module.g1.la.gamma", "module.g1.last.weight", "module.g1.last.bias", "module.g2.la.gamma", "module.g2.last.weight", "module.g2.last.bias", "module.g3.la.gamma", "module.g3.last.weight", "module.g3.last.bias"."
Do you know why?
Thanks a lot!
Regards.