From dfeb9072208095669528fc5ae2dedf78f089d9ad Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Tue, 26 Jul 2022 17:21:55 +0200 Subject: [PATCH] Update. --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 1cd7342..ac1e2e3 100755 --- a/main.py +++ b/main.py @@ -446,7 +446,7 @@ else: nb_epochs_finished = 0 if args.no_checkpoint: - log_string(f'Not trying to load checkpoint.') + log_string(f'not trying to load checkpoint.') else: try: @@ -454,13 +454,13 @@ else: nb_epochs_finished = checkpoint['nb_epochs_finished'] model.load_state_dict(checkpoint['model_state']) optimizer.load_state_dict(checkpoint['optimizer_state']) - log_string(f'Checkpoint loaded with {nb_epochs_finished} epochs finished.') + log_string(f'checkpoint loaded with {nb_epochs_finished} epochs finished.') except FileNotFoundError: - log_string('Starting from scratch.') + log_string('starting from scratch.') except: - log_string('Error when loading the checkpoint.') + log_string('error when loading the checkpoint.') exit(1) ###################################################################### @@ -473,7 +473,7 @@ for input in task.batches(split = 'train'): token_probas = token_count / token_count.sum() h = -torch.xlogy(token_probas, token_probas).sum() train_set_perplexity = math.exp(h) -log_string(f'Train set perplexity {train_set_perplexity}') +log_string(f'train set perplexity {train_set_perplexity}') for k in range(nb_epochs_finished, nb_epochs): -- 2.39.5