Skip to content

Commit

Permalink
Fix bias qcdq export
Browse files Browse the repository at this point in the history
  • Loading branch information
volcacius committed Jun 19, 2023
1 parent 2791be9 commit db16127
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/brevitas/export/common/handler/qcdq.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def symbolic_execution(self, x: Tensor, input_scale=None, input_bit_width=None):
if input_scale is not None:
scale = input_scale
scale_orig_shape = scale.shape
zero_point_orig_shape = zero_point.shape
if input_bit_width is not None:
bit_width = input_bit_width
quant_axis = self.quant_axis(scale)
Expand All @@ -279,7 +278,7 @@ def symbolic_execution(self, x: Tensor, input_scale=None, input_bit_width=None):
y = self.dequantize_fn(int_bias, scale, zero_point, quant_axis)
# Restore the original shapes to guarantee correct shape propagation downstream
scale = scale.view(scale_orig_shape)
zero_point = zero_point.view(zero_point_orig_shape)
zero_point = zero_point.view_as(scale)
return y, scale, zero_point, bit_width


Expand Down

0 comments on commit db16127

Please # to comment.