提交 e8fc16d7 编写于 作者: H HydrogenSulfate

update rep condition

上级 de1e9cab
...@@ -465,9 +465,8 @@ class Engine(object): ...@@ -465,9 +465,8 @@ class Engine(object):
model.eval() model.eval()
# for rep nets # for rep nets
if "Slim" not in self.config or self.config["Slim"]["quant"]["name"] != "pact":
for layer in self.model.sublayers(): for layer in self.model.sublayers():
if hasattr(layer, "rep"): if hasattr(layer, "rep") and not getattr(layer, "is_repped"):
layer.rep() layer.rep()
save_path = os.path.join(self.config["Global"]["save_inference_dir"], save_path = os.path.join(self.config["Global"]["save_inference_dir"],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册