Skip to content

Commit 6fe01b3

Browse files
authored
Merge pull request #681 from esythan/benchmark
fix benchmark bug in infer.py
2 parents 68b1af3 + 3a4ad89 commit 6fe01b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/utils/static_ps/infer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def run(self):
7272
self.exe = paddle.static.Executor(place)
7373

7474
init_model_path = config.get("runner.model_save_path")
75-
init_model_path = os.path.join(
76-
config["config_abs_dir"], init_model_path)
75+
init_model_path = os.path.join(config["config_abs_dir"],
76+
init_model_path)
7777
logger.info("init_model_path: {}".format(init_model_path))
7878
for file in os.listdir(init_model_path):
7979
file_path = os.path.join(init_model_path, file)
@@ -102,6 +102,8 @@ def network(self):
102102
self.init_reader()
103103

104104
def run_infer(self, model_path, model_name):
105+
model_path = model_path + "/dnn_plugin"
106+
print("load model:", model_path)
105107
[inference_program, feed_target_names, fetch_targets] = (
106108
paddle.fluid.io.load_inference_model(
107109
dirname=model_path, executor=self.exe))

0 commit comments

Comments
 (0)