Skip to content

Commit

Permalink
Update nncf/quantization/algorithms/weight_compression/weight_lowerin…
Browse files Browse the repository at this point in the history
…g.py

Co-authored-by: Alexander Kozlov <[email protected]>
  • Loading branch information
alexsu52 and AlexKoff88 authored Jul 30, 2024
1 parent 7d86837 commit 123d9ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def calculate_signed_scale(weight: Tensor, reduction_axes: ReductionAxes, num_bi
w_abs_min = fns.abs(fns.min(weight, axis=reduction_axes, keepdims=True))
w_max = fns.max(weight, axis=reduction_axes, keepdims=True)

scale = fns.where(w_abs_min > w_max, w_abs_min, -w_max)
scale = fns.where(w_abs_min >= w_max, w_abs_min, -w_max)
scale /= level_high

eps = fns.finfo(scale).eps
Expand Down

0 comments on commit 123d9ca

Please sign in to comment.