From 960d2ebcd3b7d139861baebdce0698f3ad00f1d8 Mon Sep 17 00:00:00 2001 From: Adrian Charkiewicz Date: Sat, 7 May 2022 21:48:07 +0200 Subject: [PATCH] epochs? --- pytorch/pytorch.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pytorch/pytorch.py b/pytorch/pytorch.py index c4ddd63..6ef38f1 100644 --- a/pytorch/pytorch.py +++ b/pytorch/pytorch.py @@ -29,15 +29,15 @@ ex.observers.append(FileStorageObserver('my_runs')) # ex.observers.append(MongoObserver(url='mongodb://mongo_user:mongo_password_IUM_2021@localhost:27017', db_name='sacred')) -try: - numberOfEpochParam = int(sys.argv[1]) -except: - # dafault val - numberOfEpochParam = 1500 +#try: +# numberOfEpochParam = int(sys.argv[1]) +#except: +# dafault val +#numberOfEpochParam = 1500 @ex.config def my_config(): - epochs = numberOfEpochParam + epochs = 1500 @@ -217,6 +217,7 @@ with open("result.txt", "w+") as file: def main(): lr = 1e-6 my_config() + print("number of epochs is: ", epochs) history5 = fit(epochs, lr, model, train_loader, val_loader) ex.run()