Skip to content

Commit

Permalink
Add default
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Oct 29, 2024
1 parent 20f2dea commit 8c2454d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/brevitas/core/scaling/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ def __init__(
restrict_scaling_impl: Module = FloatRestrictValue(),
restrict_threshold_impl: Optional[Module] = None) -> None:
super(RuntimeDynamicGroupStatsScaling, self).__init__()

# Ensure retro-compatibility with shared threshold/scaling restrict
if restrict_threshold_impl is None:
restrict_threshold_impl = restrict_scaling_impl

self.group_size = group_size
self.group_dim = group_dim
self.scaling_stats_impl = scaling_stats_impl
Expand Down

0 comments on commit 8c2454d

Please sign in to comment.