Skip to content

Commit

Permalink
Merge pull request facebookresearch#68 from m-Just/patch-2
Browse files Browse the repository at this point in the history
Update train.py
  • Loading branch information
lopezpaz authored Aug 25, 2021
2 parents 7f82a22 + 290d7d5 commit 4c16e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion domainbed/scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def save_checkpoint(filename):
"model_num_classes": dataset.num_classes,
"model_num_domains": len(dataset) - len(args.test_envs),
"model_hparams": hparams,
"model_dict": algorithm.cpu().state_dict()
"model_dict": algorithm.state_dict()
}
torch.save(save_dict, os.path.join(args.output_dir, filename))

Expand Down

0 comments on commit 4c16e32

Please sign in to comment.