Skip to content

Commit

Permalink
rm cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
um3 committed Jan 24, 2024
1 parent d81db6f commit e03564e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ def save_network(network, dirname, epoch_label, local_rank=-1):

if local_rank>-1:
if local_rank == 0: # save the main process model
torch.save(network.cpu().state_dict(), save_path)
torch.save(network.state_dict(), save_path)
network.cuda(local_rank)
else:
torch.save(network.cpu().state_dict(), save_path)
torch.save(network.state_dict(), save_path)
network.cuda()


Expand Down

0 comments on commit e03564e

Please sign in to comment.