From 471d09f2fcc1b2a8fa28f0ac794df70361fe9e7a Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Mon, 6 Jan 2025 18:44:47 +0100 Subject: [PATCH] Update calibrate.py --- src/brevitas/graph/calibrate.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/brevitas/graph/calibrate.py b/src/brevitas/graph/calibrate.py index d03a979e4..a9c090c47 100644 --- a/src/brevitas/graph/calibrate.py +++ b/src/brevitas/graph/calibrate.py @@ -75,11 +75,6 @@ def set_collect_stats_to_average(module): def finalize_collect_stats(module): - if hasattr(module, 'collect_stats_steps') and hasattr(module, 'counter'): - # If the counter has already reached collect_stats_steps, we do not want to reset it - # otherwise the restrict_preprocess might be applied twice: during calibration - # (that happens in training mode) and then when the model is evaluated - module.counter = max(module.collect_stats_steps, module.counter) if hasattr(module, 'init_scale'): module.init_scale()