未验证 提交 173a2c2f 编写于 作者: J Jason 提交者: GitHub

Merge pull request #95 from wuyefeilin/develop

update utils.py
...@@ -269,11 +269,9 @@ def load_pretrain_weights(exe, ...@@ -269,11 +269,9 @@ def load_pretrain_weights(exe,
vars_to_load.append(var) vars_to_load.append(var)
logging.debug("Weight {} will be load".format(var.name)) logging.debug("Weight {} will be load".format(var.name))
fluid.io.load_vars( params_dict = fluid.io.load_program_state(
executor=exe, weights_dir, var_list=vars_to_load)
dirname=weights_dir, fluid.io.set_program_state(main_prog, params_dict)
main_program=main_prog,
vars=vars_to_load)
if len(vars_to_load) == 0: if len(vars_to_load) == 0:
logging.warning( logging.warning(
"There is no pretrain weights loaded, maybe you should check you pretrain model!" "There is no pretrain weights loaded, maybe you should check you pretrain model!"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册