set_logging_level
Applicability
Product |
Supported |
|---|---|
x |
|
x |
|
x |
|
x |
|
√ |
Description
Sets the log levels of the messages printed to the screen and those saved in the amct_log/amct_tensorflow.log file.
Prototype
1 | set_logging_level(print_level='info', save_level='info') |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
print_level |
Input |
Sets the level of the information to be printed.
Default: info A string. |
save_level |
Input |
Sets the level of information saved in the quant_info.log file.
Default: info A string. |
Log Level |
Description |
|---|---|
DEBUG |
Detailed quantization processing information, including the quantization factors (scale and offset) and related debugging information. |
INFO |
Brief quantization processing information, including the quantized layer names and BN fusion information. |
WARNING |
Warning messages during quantization. |
ERROR |
Error messages during quantization. |
Log levels are case insensitive. For instance, Info, info, and INFO are all valid values.
Returns
None
Example
1 2 3 4 5 6 7 8 9 10 11 | import amct_tensorflow as amct amct.set_logging_level(print_level="info", save_level="info") amct.quantize_model( graph=tf.get_default_graph(), config_file="./configs/config.json", record_file="./record_scale_offset.txt") ... amct.save_model(pb_model="./user_model.pb", outputs=["model/outputs"], record_file="./record_scale_offset.txt", save_path="./inference/model") |