Deep Learning
[Pytorch] Assign (loaded) pre-trained model params to a specific layer of a new model
ddokkddokk
2022. 7. 22. 10:00
반응형
self.model.Traj_Dec.decoder_mlp[0].weight.data = checkpoint['scratch_state_dict']['Traj_Dec.decoder_mlp.0.weight']
self.model.Traj_Dec.decoder_mlp[0].bias.data = checkpoint['scratch_state_dict']['Traj_Dec.decoder_mlp.0.bias']