From 6e8ff73ea2aea8502218986529edec6a01bcf6c8 Mon Sep 17 00:00:00 2001 From: Aleksei Kashapov Date: Thu, 14 Nov 2024 01:18:07 +0100 Subject: [PATCH] some fixes --- nncf/experimental/common/tensor_statistics/collectors.py | 2 +- nncf/quantization/algorithms/bias_correction/algorithm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nncf/experimental/common/tensor_statistics/collectors.py b/nncf/experimental/common/tensor_statistics/collectors.py index 1ffd53dceab..2c6ad86416e 100644 --- a/nncf/experimental/common/tensor_statistics/collectors.py +++ b/nncf/experimental/common/tensor_statistics/collectors.py @@ -543,7 +543,7 @@ def __init__(self, num_samples: Optional[int]): super().__init__(None, num_samples=num_samples) def _register_reduced_input_impl(self, x: TensorType) -> None: - self._container.append(x) + self._container.append(deepcopy(x)) def _aggregate_impl(self): return self._container diff --git a/nncf/quantization/algorithms/bias_correction/algorithm.py b/nncf/quantization/algorithms/bias_correction/algorithm.py index 938a1166f44..63db2ee0adf 100644 --- a/nncf/quantization/algorithms/bias_correction/algorithm.py +++ b/nncf/quantization/algorithms/bias_correction/algorithm.py @@ -442,7 +442,7 @@ def _get_bias_shift_magnitude(current_bias_value: Tensor, updated_bias_value: Te """ bias_shift_magnitude = fns.max( fns.abs( - (updated_bias_value - current_bias_value) / (current_bias_value + fns.finfo(current_bias_value).min) + (updated_bias_value - current_bias_value) / (current_bias_value + fns.finfo(current_bias_value).eps) ) ) return bias_shift_magnitude