未验证 提交 0c34d239 编写于 作者: C Chang Xu 提交者: GitHub

Add condition in Dygraph/QAT (#1371)

上级 341ada8a
......@@ -243,8 +243,8 @@ class QAT(object):
"""
assert isinstance(model, paddle.nn.Layer), \
"The model must be the instance of paddle.nn.Layer."
self._model = copy.deepcopy(model)
if self.weight_preprocess is not None or self.act_preprocess is not None:
self._model = copy.deepcopy(model)
if inplace:
quantize_model = self.imperative_qat.quantize(model)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册