From aa31c1845e8a9262398c0a494ae4235c331b116a Mon Sep 17 00:00:00 2001 From: Nick Fraser Date: Wed, 20 Dec 2023 18:16:56 +0000 Subject: [PATCH] Fix: changed other.tensor -> other.value --- src/brevitas/quant_tensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brevitas/quant_tensor/__init__.py b/src/brevitas/quant_tensor/__init__.py index 707f12854..d8bb253bb 100644 --- a/src/brevitas/quant_tensor/__init__.py +++ b/src/brevitas/quant_tensor/__init__.py @@ -406,7 +406,7 @@ def __sub__(self, other): def __truediv__(self, other): if isinstance(other, QuantTensor) and self.is_not_none and other.is_not_none: - output_tensor = self.value / other.tensor # Note, output tensor not guaranteed to pass self.is_valid() + output_tensor = self.value / other.value # Note, output tensor not guaranteed to pass self.is_valid() max_int_denominator = 2 ** (other.bit_width - int(other.signed)) output_scale = self.scale / (other.scale * max_int_denominator) output_bit_width = self.bit_width + other.bit_width