update rep condition

pull/2106/head
HydrogenSulfate 2022-06-28 05:58:14 +00:00
parent de1e9cab74
commit e8fc16d76b
1 changed files with 3 additions and 4 deletions

View File

@ -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")