提交 eea40f49 编写于 作者: X xixiaoyao

fix bugs

上级 2f2e84b6
......@@ -58,13 +58,14 @@ def init_pretraining_params(exe,
with tarfile.open(os.path.join(pretraining_params_path, '__palmmodel__'), 'r:') as f:
f.extractall(os.path.join(pretraining_params_path, '.temp'))
log_path = os.path.join(pretraining_params_path, '__palmmodel__')
pretraining_params_path = os.path.join(pretraining_params_path, '.temp')
def existed_params(var):
if not isinstance(var, fluid.framework.Parameter):
return False
if not os.path.exists(os.path.join(pretraining_params_path, var.name)):
print('Warning: {} not found in {}.'.format(var.name, pretraining_params_path))
print('Warning: {} not found in {}.'.format(var.name, log_path))
return os.path.exists(os.path.join(pretraining_params_path, var.name))
fluid.io.load_vars(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册