This commit is contained in:
Glenn Jocher 2019-04-05 15:43:41 +02:00
parent 1f889c575e
commit fe896c1792
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ def train(
best_loss = results[0] best_loss = results[0]
# Save training results # Save training results
save = True and not opt.no_save save = True and not opt.nosave
if save: if save:
# Create checkpoint # Create checkpoint
chkpt = {'epoch': epoch, chkpt = {'epoch': epoch,
@ -230,7 +230,7 @@ if __name__ == '__main__':
parser.add_argument('--rank', default=0, type=int, help='distributed training node rank') parser.add_argument('--rank', default=0, type=int, help='distributed training node rank')
parser.add_argument('--world-size', default=1, type=int, help='number of nodes for distributed training') parser.add_argument('--world-size', default=1, type=int, help='number of nodes for distributed training')
parser.add_argument('--backend', default='nccl', type=str, help='distributed backend') parser.add_argument('--backend', default='nccl', type=str, help='distributed backend')
parser.add_argument('--no-save', action='store_false', help='transfer learning flag') parser.add_argument('--nosave', action='store_true', help='do not save training results')
opt = parser.parse_args() opt = parser.parse_args()
print(opt, end='\n\n') print(opt, end='\n\n')