From 7c6567cc6b3eae3e61afaa0d416e902948778a3c Mon Sep 17 00:00:00 2001 From: weishengyu Date: Thu, 9 Dec 2021 18:08:16 +0800 Subject: [PATCH] dbg --- ppcls/engine/slim/quant.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppcls/engine/slim/quant.py b/ppcls/engine/slim/quant.py index cfac07b60..b8f59a78f 100644 --- a/ppcls/engine/slim/quant.py +++ b/ppcls/engine/slim/quant.py @@ -46,10 +46,10 @@ def quantize_model(config, model): assert config["Slim"]["quant"]["name"].lower( ) == 'pact', 'Only PACT quantization method is supported now' QUANT_CONFIG["activation_preprocess_type"] = "PACT" - model.quanted = QAT(config=QUANT_CONFIG) - model.quanted.quantize_model(model) + model.quanter = QAT(config=QUANT_CONFIG) + model.quanter.quantize(model) logger.info("QAT model summary:") paddle.summary(model, (1, 3, 224, 224)) else: - model.quanted = None - return model.quanted + model.quanter = None + return