Update.
authorFrancois Fleuret <francois@fleuret.org>
Tue, 26 Jul 2022 15:21:55 +0000 (17:21 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Tue, 26 Jul 2022 15:21:55 +0000 (17:21 +0200)
main.py

diff --git a/main.py b/main.py
index 1cd7342..ac1e2e3 100755 (executable)
--- 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):