Skip to content
Snippets Groups Projects
Commit 726d6a3d authored by Axel Farrugia's avatar Axel Farrugia
Browse files

[Chore](R18) Round the tensor after rescaling

parent 6294bb9c
No related branches found
No related tags found
No related merge requests found
......@@ -333,6 +333,7 @@ if quantize_model:
rescaling = 2**(NB_BITS-1)-1
for i in range(max(NB_TEST, NB_CALIB)):
array = np.array(aidge_tensors[i]) * rescaling
array = np.round(array).astype(int)
aidge_tensors[i] = aidge_core.Tensor(array)
aidge_tensors[i].set_datatype(TARGET_TYPE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment