Skip to content

Commit

Permalink
feat: change checkpoint save path
Browse files Browse the repository at this point in the history
'saved_models/checkpoint.pt' --> 'checkpoint.pt'
  • Loading branch information
Bjarten committed Dec 30, 2018
1 parent 5aee053 commit 11da3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorchtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ def __call__(self, val_loss, model):
def save_checkpoint(self, val_loss, model):
'''Saves model when validation loss decrease.'''
print(f'Validation loss decreased ({self.val_loss_min:.6f} --> {val_loss:.6f}). Saving model ...')
torch.save(model.state_dict(), 'saved_models/checkpoint.pt')
torch.save(model.state_dict(), 'checkpoint.pt')
self.val_loss_min = val_loss

0 comments on commit 11da3df

Please sign in to comment.