From 2ee976b3249254d1eb796678c5408ea45293489b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Tue, 28 Mar 2023 22:36:19 +0200 Subject: [PATCH] Update --- beaver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beaver.py b/beaver.py index f5b3563..7800527 100755 --- a/beaver.py +++ b/beaver.py @@ -265,6 +265,8 @@ def oneshot(gpt, learning_rate_scheduler, task): for n_epoch in range(args.nb_epochs): learning_rate = learning_rate_scheduler.get_learning_rate() + log_string(f"learning_rate {n_epoch} {learning_rate}") + optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate) acc_train_loss, nb_train_samples = 0, 0 @@ -711,8 +713,7 @@ learning_rate_scheduler.reset() for n_epoch in range(nb_epochs_finished, args.nb_epochs): learning_rate = learning_rate_scheduler.get_learning_rate() - - log_string(f"learning_rate {learning_rate}") + log_string(f"learning_rate {n_epoch} {learning_rate}") if args.optim == "sgd": optimizer = torch.optim.SGD(model.parameters(), lr=learning_rate) -- 2.39.5