Skip to content

Commit 8c1aca4

Browse files
committed
Add SAWB-based recomputation of weights and refactor whole process
Signed-off-by: Andrea Fasoli <andrea.fasoli@ibm.com>
1 parent 770a5e1 commit 8c1aca4

2 files changed

Lines changed: 294 additions & 99 deletions

File tree

fms_mo/quant/quantizers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def set_quantizer(self):
428428
else:
429429
self.quantizer = SAWBSTE
430430

431-
def forward(self, input_tensor):
431+
def forward(self, input_tensor: torch.Tensor) -> torch.Tensor:
432432
input_tensor = self.quantizer.apply(
433433
input_tensor,
434434
self.num_bits,

0 commit comments

Comments
 (0)