diff --git a/ppcls/engine/engine.py b/ppcls/engine/engine.py index 7df38b9a75efd425cdab7a11cadc8883aec26a2e..884a05bb141947d70d2a20c2d88967bcbe6626ea 100644 --- a/ppcls/engine/engine.py +++ b/ppcls/engine/engine.py @@ -465,10 +465,9 @@ class Engine(object): model.eval() # for rep nets - if "Slim" not in self.config or self.config["Slim"]["quant"]["name"] != "pact": - for layer in self.model.sublayers(): - if hasattr(layer, "rep"): - layer.rep() + for layer in self.model.sublayers(): + if hasattr(layer, "rep") and not getattr(layer, "is_repped"): + layer.rep() save_path = os.path.join(self.config["Global"]["save_inference_dir"], "inference")