Skip to content

Commit de1450a

Browse files
lior-diksteinliord
andauthored
Fix bug from last PR in histogram collector (#1370)
Co-authored-by: liord <lior.dikstein@altair-semi.com>
1 parent 850aa63 commit de1450a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model_compression_toolkit/core/common/collectors/histogram_collector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _merge_histograms(self):
7878
merged_histogram_counts = None
7979
for histogram in self._histogram_per_iteration: # Iterate all collected histograms and merge them
8080
if merged_histogram_counts is None: # First histogram to consider
81-
merged_histogram_counts = histogram[0].astype(np.float64) # Convert to float64
81+
merged_histogram_counts = interpolate_histogram(merged_histogram_bins, histogram[1], histogram[0])
8282
else: # Merge rest of histograms into existing final histogram
8383
merged_histogram_counts += interpolate_histogram(merged_histogram_bins, histogram[1], histogram[0])
8484

0 commit comments

Comments
 (0)