Skip to content

Commit

Permalink
Update calibrate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 authored Jan 6, 2025
1 parent b45f298 commit 471d09f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/brevitas/graph/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 471d09f

Please sign in to comment.