From 346845f6ea97cf75447aeb419e014ef8013b68eb Mon Sep 17 00:00:00 2001 From: "xiangyu.xie" Date: Wed, 10 Jun 2026 11:18:21 +0200 Subject: [PATCH] Fix bug: model.eval() is back now --- Infer_2Photon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Infer_2Photon.py b/Infer_2Photon.py index 5f42079..f2f6c27 100644 --- a/Infer_2Photon.py +++ b/Infer_2Photon.py @@ -152,7 +152,7 @@ if __name__ == "__main__": model_version = conf.model.experiment_name.split('_v')[-1][:6] model = get_double_photon_model_class(model_version)().cuda() model.load_state_dict(torch.load(f'{conf.model.base_dir}/{conf.model.experiment_name}/Models/{conf.model.name}', weights_only=True)) - # model.eval() + model.eval() ### data loading files_list = get_files_list(conf) @@ -160,7 +160,7 @@ if __name__ == "__main__": BinningFactor = conf.inference.binning_factor numberOfAugOps = conf.inference.num_aug_ops flag_normalize = conf.data.normalize - nChunks = np.ceil(len(files_list) / 16).astype(int) + nChunks = np.ceil(len(files_list) / conf.inference.chunk_size).astype(int) ml_super_frame = np.zeros((NY*BinningFactor, NX*BinningFactor), dtype=np.int32) count_frame = np.zeros((NY, NX), dtype=np.int32)