From 1e23d45446346a76c6df1af09e24c9081e9836d7 Mon Sep 17 00:00:00 2001 From: Danilo Ferreira de Lima <danilo.enoque.ferreira.de.lima@xfel.de> Date: Thu, 4 May 2023 16:06:37 +0200 Subject: [PATCH] Update configuration to speed it up. --- pes_to_spec/bnn.py | 6 +++--- pes_to_spec/test/offline_analysis.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pes_to_spec/bnn.py b/pes_to_spec/bnn.py index aa9cf7d..887512e 100644 --- a/pes_to_spec/bnn.py +++ b/pes_to_spec/bnn.py @@ -200,10 +200,10 @@ class BNNModel(RegressorMixin, BaseEstimator): self.model = BNN(X.shape[1], y.shape[1]) # prepare data loader - B = 100 + B = 50 loader = DataLoader(ds, batch_size=B, - num_workers=32, + num_workers=20, shuffle=True, #pin_memory=True, drop_last=True, @@ -222,7 +222,7 @@ class BNNModel(RegressorMixin, BaseEstimator): # train self.model.train() - epochs = 1000 + epochs = 500 for epoch in range(epochs): meter = {k: AverageMeter(k, ':6.3f') for k in ('loss', '-log(lkl)', '-log(prior)', '-log(hyper)', 'sigma', 'w.prec.')} diff --git a/pes_to_spec/test/offline_analysis.py b/pes_to_spec/test/offline_analysis.py index 2da28eb..5ede953 100755 --- a/pes_to_spec/test/offline_analysis.py +++ b/pes_to_spec/test/offline_analysis.py @@ -144,7 +144,7 @@ def main(): parser.add_argument('-o', '--offset', type=int, metavar='INT', default=0, help='Train ID offset') parser.add_argument('-c', '--xgm_cut', type=float, metavar='INTENSITY', default=500, help='XGM intensity threshold in uJ.') parser.add_argument('-e', '--bnn', action="store_true", default=False, help='Use BNN?') - parser.add_argument('-w', '--weight', action="store_true", default=True, help='Whether to reweight data as a function of the pulse energy to make it invariant to that.') + parser.add_argument('-w', '--weight', action="store_true", default=False, help='Whether to reweight data as a function of the pulse energy to make it invariant to that.') args = parser.parse_args() -- GitLab