Skip to content

Commit a70edd0

Browse files
committed
fix: remove 2 * 0.5 in noise generation
1 parent 8cacea6 commit a70edd0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compressai/entropy_models/entropy_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def quantize(
158158

159159
if mode == "noise":
160160
half = float(0.5)
161-
noise = 2*half*torch.rand_like(inputs) - half
161+
noise = torch.rand_like(inputs) - half
162162
inputs = inputs + noise
163163
return inputs
164164

0 commit comments

Comments
 (0)