[Feat] Add quantized exports for Resnet18 and LeNet
Compare changes
This MR aims to enable the quantized (int8) export of LeNet and Resnet18.
It brings a lot of changes to clean and update the CPP Aidge export with the latest features.
operators.py
file to several ones, each matching the actual implementation of one given kernel.cpp_fuse_to_metaops()
: Fuse the model nodes into the metaoperators corresponding to the operators supported by the export.set_nodes_names()
: Rename the newly created nodes based on their type, position in the graph and number of iterations of this specific layer, to ensure readability once exported.set_nodes_datatypes()
: Datatypes have to be set manually after the quantization step.read_log_file()
: May be useful to compare intermediate results...kernels_to_copy
export node system as the old system had some limitations. Indeed, it was not possible to chose a destination path different from the source path. Also the copied kernel would be automatically included in the fwd file, sometime leading to unused includes. The new system is based on a list of dict holding, for each kernel file, the source and destination paths as well as a boolean to indicate if the kernel needs to be included in the forward file.aidge_cmp
feature which allows to compare the aidge_export_cpp
and aidge_backend_cpu
intermediate tensor results for the exported model.create_lenet.py
) which create, train and export a LeNet model.lenet.py
file describing the different steps to perform an export with the aidge_export_cpp
module.resnet18.py
file describing the different steps to perform an export with the aidge_export_cpp
module.aidge_cmp
option which exports the log_outputs
(intermediate tensors generated by the aidge_backend_cpu
) as reference and allow data comparison at inference time.--dtype int8
while running the lenet.py
file.--dtype int8
while running the resnet18.py
file.[ResNet18] Export Cpp INT8 not supported
Copyright © Eclipse Foundation, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Copyright Agent