提交 192ab39a 编写于 作者: J jiangjiajun

fix scope problem for slim

上级 6a89ed13
...@@ -69,7 +69,7 @@ def load_model(model_dir, fixed_input_shape=None): ...@@ -69,7 +69,7 @@ def load_model(model_dir, fixed_input_shape=None):
if status == "Prune": if status == "Prune":
from .slim.prune import update_program from .slim.prune import update_program
model.test_prog = update_program(model.test_prog, model_dir, model.test_prog = update_program(model.test_prog, model_dir,
model.places[0]) model.places[0], scope=model_scope)
import pickle import pickle
with open(osp.join(model_dir, 'model.pdparams'), 'rb') as f: with open(osp.join(model_dir, 'model.pdparams'), 'rb') as f:
load_dict = pickle.load(f) load_dict = pickle.load(f)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册