We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b15584d commit 412efe6Copy full SHA for 412efe6
cortex/_lib/exp.py
@@ -96,7 +96,10 @@ def strip_Nones(d):
96
97
file_path = path.join(binary_dir, '{}.t7'.format(filename))
98
if prefix == 'last':
99
- copyfile(file_path, file_path + '.bak')
+ try:
100
+ copyfile(file_path, file_path + '.bak')
101
+ except FileNotFoundError:
102
+ pass
103
104
logger.info('Saving checkpoint {}'.format(file_path))
105
torch.save(state, file_path)
0 commit comments