You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I specify signed=False as well as min_val=0.0 and max_val=255 to use the whole range of 8 bits on the output. However, I observe that the output values are clipped between {0,127} such that e.g. 198 becomes 127. When I do not specify signed but keep min_val=0.0 and max_val=255, output values are divided by 2 such that e.g. 198 becomes 99.
The behavior is observed when simulating the stitched IP in Vivado.
Am I doing something wrong? I hope someone can help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I am trying to quantize the output of a FINN accelerator as follows:
self.qnt_output = QuantIdentity(
quant_type=QuantType.INT,
bit_width=8,
signed=False,
min_val=0.0,
max_val=255.0)
x = self.qnt_output(x)
I specify
signed=False
as well asmin_val=0.0
andmax_val=255
to use the whole range of 8 bits on the output. However, I observe that the output values are clipped between {0,127} such that e.g. 198 becomes 127. When I do not specifysigned
but keepmin_val=0.0
andmax_val=255
, output values are divided by 2 such that e.g. 198 becomes 99.The behavior is observed when simulating the stitched IP in Vivado.
Am I doing something wrong? I hope someone can help.
Thanks,
Nicolaj
Beta Was this translation helpful? Give feedback.
All reactions