From f35b0dc0ebbcee6728a6ee8bef6e0d6b5a051c78 Mon Sep 17 00:00:00 2001 From: ceci3 <592712189@qq.com> Date: Mon, 25 Nov 2019 09:28:17 +0000 Subject: [PATCH] fix controller --- paddleslim/common/sa_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/common/sa_controller.py b/paddleslim/common/sa_controller.py index 9a36da93..932f5b5d 100644 --- a/paddleslim/common/sa_controller.py +++ b/paddleslim/common/sa_controller.py @@ -98,7 +98,7 @@ class SAController(EvolutionaryController): new_tokens = tokens[:] index = int(len(self._range_table[0]) * np.random.random()) new_tokens[index] = np.random.randint(self._range_table[0][index], - self._range_table[1][index] + 1) + self._range_table[1][index]) _logger.debug("change index[{}] from {} to {}".format(index, tokens[ index], new_tokens[index])) if self._constrain_func is None or self._max_try_times is None: -- GitLab