From 2ec8416630df2efa5bfc04feaf7aff957cb62765 Mon Sep 17 00:00:00 2001 From: Giuseppe Franco Date: Tue, 31 Dec 2024 11:55:44 +0000 Subject: [PATCH] Trunc fix --- src/brevitas/core/quant/int.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/brevitas/core/quant/int.py b/src/brevitas/core/quant/int.py index 248931d68..3d60fee80 100644 --- a/src/brevitas/core/quant/int.py +++ b/src/brevitas/core/quant/int.py @@ -216,8 +216,6 @@ def forward(self, x: Tensor, scale: Tensor, zero_point: Tensor, trunc_scale = 2.0 ** trunc_bit_width y = y / trunc_scale y = self.float_to_int_impl(y) - y = y - zero_point - y = y * scale return y, scale, zero_point, output_bit_width