未验证 提交 1c2aae56 编写于 作者: W whs 提交者: GitHub

Skip start epoch and end epoch when dumping strategy in PaddleSlim (#19580)

test=develop
上级 c5548178
......@@ -27,7 +27,7 @@ __all__ = ['ConfigFactory']
"""This factory is used to create instances by loading and parsing configure file with yaml format.
"""
PLUGINS = ['pruners', 'quantizers', 'quantizers', 'strategies', 'controllers']
PLUGINS = ['pruners', 'quantizers', 'distillers', 'strategies', 'controllers']
class ConfigFactory(object):
......
......@@ -29,6 +29,13 @@ class Strategy(object):
self.start_epoch = start_epoch
self.end_epoch = end_epoch
def __getstate__(self):
d = {}
for key in self.__dict__:
if key not in ["start_epoch", "end_epoch"]:
d[key] = self.__dict__[key]
return d
def on_compression_begin(self, context):
pass
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册