From 336536578ebad18be86b87bfb91f517ff5467205 Mon Sep 17 00:00:00 2001 From: ceci3 <592712189@qq.com> Date: Wed, 4 Dec 2019 09:22:19 +0000 Subject: [PATCH] update --- paddleslim/nas/sa_nas.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paddleslim/nas/sa_nas.py b/paddleslim/nas/sa_nas.py index 38cdb186..6a3fb80f 100644 --- a/paddleslim/nas/sa_nas.py +++ b/paddleslim/nas/sa_nas.py @@ -122,7 +122,12 @@ class SANAS(object): self._controller_client = ControllerClient( server_ip, server_port, key=self._key) - self._iter = 0 + if is_server and load_checkpoint != None: + checkpoint_path = os.path.join(load_checkpoint, 'sanas.checkpoints') + scene = json.load(checkpoint_path) + self._iter = scene['_iter'] + else: + self._iter = 0 def _get_host_ip(self): return socket.gethostbyname(socket.gethostname()) -- GitLab