Skip to content

Commit

Permalink
Fixing backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colbert committed Oct 10, 2023
1 parent 216e68e commit 78ec9be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/brevitas_examples/super_resolution/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import torch.nn as nn

from brevitas.core.restrict_val import RestrictValueType
from brevitas.core.restrict_val import FloatRestrictValue
from brevitas.core.scaling import ScalingImplType
import brevitas.nn as qnn
from brevitas.nn.quant_layer import WeightQuantType
Expand All @@ -25,6 +26,7 @@ class CommonIntWeightPerChannelQuant(Int8WeightPerTensorFloat):


class CommonIntAccumulatorAwareWeightQuant(Int8AccumulatorAwareWeightQuant):
restrict_scaling_impl = FloatRestrictValue # backwards compatibility
pre_scaling_min_val = 1e-10
scaling_min_val = 1e-10

Expand Down

0 comments on commit 78ec9be

Please sign in to comment.