未验证 提交 3ae057ac 编写于 作者: C ceci3 提交者: GitHub

fix ac import ptq_hpo (#1170)

上级 1b498f13
......@@ -35,7 +35,7 @@ _logger = get_logger(__name__, level=logging.INFO)
try:
if platform.system().lower() == 'linux':
from ..quant import quant_post_hpo
from ..quant import post_quant_hpo
except Exception as e:
_logger.warning(e)
......@@ -409,7 +409,7 @@ class AutoCompression:
if strategy == 'ptq_hpo' and config.max_quant_count == 1 and platform.system(
).lower() == 'linux':
ptq_loss = quant_post_hpo.g_min_emd_loss
ptq_loss = post_quant_hpo.g_min_emd_loss
final_quant_config = get_final_quant_config(ptq_loss)
if final_quant_config is not None:
......@@ -468,7 +468,7 @@ class AutoCompression:
raise NotImplementedError(
"post-quant-hpo is not support in system other than linux")
quant_post_hpo.quant_post_hpo(
post_quant_hpo.quant_post_hpo(
self._exe,
self._places,
model_dir=self.model_dir,
......
......@@ -34,7 +34,7 @@ try:
from .quanter import quant_post, quant_post_only_weight
from .quant_aware_with_infermodel import quant_aware_with_infermodel, export_quant_infermodel
if platform.system().lower() == 'linux':
from .quant_post_hpo import quant_post_hpo
from .post_quant_hpo import quant_post_hpo
else:
_logger.warning(
"post-quant-hpo is not support in system other than linux")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册