From 6294bb9c89e4651cf5916e0253987e0aba5a0576 Mon Sep 17 00:00:00 2001 From: Axel Farrugia <axel.farrugia@cea.fr> Date: Fri, 2 May 2025 13:48:21 +0200 Subject: [PATCH] [Fix] Manually set the input after the quantzation step --- examples/export_ResNet18/resnet18.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/export_ResNet18/resnet18.py b/examples/export_ResNet18/resnet18.py index 3ba1ff4..935cf96 100644 --- a/examples/export_ResNet18/resnet18.py +++ b/examples/export_ResNet18/resnet18.py @@ -140,7 +140,7 @@ DO_EXAMPLES = True OPTIM_SIGN = False SINGLE_SHIFT = True ROUNDING = True -NO_QUANTIZATION = False +NO_QUANT = False CLIPPING = aidge_quantization.Clipping.MSE # 'MAX' FOLD_GRAPH = True @@ -345,7 +345,13 @@ Each time the graph has been change, it has to be reset. Here some Quantizer and Cast nodes have been added. """ +""" [Issue] +We need first to manually add an input tensor with the correct datatype, +as it is not automatically done in PTQ. +""" if quantize_model: + input_node = model.get_ordered_inputs()[0] + input_node[0].get_operator().set_input(0, aidge_tensors[0]) scheduler.reset_scheduling() # -------------------------------------------------------------- -- GitLab