Skip to content

Commit

Permalink
Fix after int_weight
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Mar 27, 2024
1 parent 57a5f78 commit e684bfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notebooks/01_quant_tensor_quant_conv2d_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
}
],
"source": [
"int_weight = default_quant_conv.int_weight()\n",
"int_weight = default_quant_conv.quant_weight().int()\n",
"zero_point = default_quant_conv.weight_quant.zero_point()\n",
"scale = default_quant_conv.weight_quant.scale()\n",
"quant_weight_manually = (int_weight - zero_point) * scale\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class StdQOpONNXQuantWBIOLHandler(StdQOpONNXQuantLayerHandler, ABC):

@staticmethod
def int_weight(module: QuantWBIOL):
int_weight = module.int_weight(float_datatype=False).detach()
int_weight = module.quant_weight().int(float_datatype=False).detach()
if module.weight_quant.is_signed:
return int_weight.type(torch.int8)
else:
Expand Down

0 comments on commit e684bfd

Please sign in to comment.