Skip to content

Commit

Permalink
fix initial assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarques committed Oct 12, 2024
1 parent 67ccf35 commit 0936480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compressed_tensors/quantization/observers/mse.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def calculate_mse_min_max(
absolute_min_val = torch.amin(observed, dim=reduce_dims, keepdims=True)
absolute_max_val = torch.amax(observed, dim=reduce_dims, keepdims=True)

best = torch.full_like(absolute_min_val.shape, torch.iinfo(absolute_min_val.dtype).max)
best = torch.full_like(absolute_min_val, torch.finfo(absolute_min_val.dtype).max)
min_val = torch.ones_like(absolute_min_val)
max_val = torch.zeros_like(absolute_max_val)
for i in range(int(self.maxshrink * self.grid)):
Expand Down

0 comments on commit 0936480

Please sign in to comment.