Skip to content

Commit

Permalink
fix can not find tmp_4
Browse files Browse the repository at this point in the history
  • Loading branch information
tink2123 committed Jun 17, 2020
1 parent d6939fa commit bce596c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def merge_config(config):
global_config[key] = value
else:
sub_keys = key.split('.')
assert (sub_keys[0] in global_config), "the sub_keys can only be one of global_config: {}, but get: {}, please check your running command".format(global_config.keys(), sub_keys[0])
assert (
sub_keys[0] in global_config
), "the sub_keys can only be one of global_config: {}, but get: {}, please check your running command".format(
global_config.keys(), sub_keys[0])
cur = global_config[sub_keys[0]]
for idx, sub_key in enumerate(sub_keys[1:]):
assert (sub_key in cur)
Expand Down Expand Up @@ -177,7 +180,6 @@ def build(config, main_prog, startup_prog, mode):
optimizer.minimize(opt_loss)
opt_loss_name = opt_loss.name
global_lr = optimizer._global_learning_rate()
global_lr.persistable = True
fetch_name_list.insert(0, "lr")
fetch_varname_list.insert(0, global_lr.name)
return (dataloader, fetch_name_list, fetch_varname_list, opt_loss_name)
Expand Down

0 comments on commit bce596c

Please sign in to comment.