Skip to content

Commit

Permalink
update DDP last
Browse files Browse the repository at this point in the history
  • Loading branch information
um3 committed Jan 24, 2024
1 parent 4b148cd commit 6cf203e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions train_DDP.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,7 @@ def train_model(model, criterion, optimizer, scheduler, num_epochs=25):

# load best model weights
model.load_state_dict(last_model_wts)
if len(opt.gpu_ids)>1:
save_network(model.module, 'last')
else:
save_network(model, 'last')
save_network(model.module, opt.name, 'last')

return model

Expand Down

0 comments on commit 6cf203e

Please sign in to comment.