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

fix nas in python3 (#21)

* fix py3

* fix
上级 479e10d2
......@@ -137,7 +137,7 @@ class SAController(EvolutionaryController):
_logger.debug("change index[{}] from {} to {}".format(
index, tokens[index], new_tokens[index]))
if self._searched.has_key(str(new_tokens)):
if str(new_tokens) in self._searched.keys():
_logger.debug('get next tokens including searched tokens: {}'.
format(new_tokens))
continue
......
......@@ -93,7 +93,7 @@ class SANAS(object):
premax_reward = scene['_max_reward']
prebest_tokens = scene['_best_tokens']
preiter = scene['_iter']
psearched = screen['_searched']
psearched = scene['_searched']
else:
preinit_tokens = init_tokens
prereward = -1
......@@ -114,7 +114,7 @@ class SANAS(object):
best_tokens=prebest_tokens,
constrain_func=None,
checkpoints=save_checkpoint,
searched = psearched)
searched=psearched)
max_client_num = 100
self._controller_server = ControllerServer(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册