fix slim bugs

pull/1093/head
dongshuilong 2021-08-09 02:50:11 +00:00
parent d5c76eee56
commit 9f03478135
2 changed files with 3 additions and 8 deletions

View File

@ -232,10 +232,10 @@ class Trainer_slim(Trainer):
self.config["Arch"]["name"], self.config["Arch"]["name"],
"best_model")) "best_model"))
elif self.config["Global"].get( elif self.config["Global"].get(
"pretraine_model", False) and os.path.exists(self.config[ "pretrained_model", False) and os.path.exists(self.config[
"Global"]["pretraine_model"] + ".pdparams"): "Global"]["pretrained_model"] + ".pdparams"):
load_dygraph_pretrain(self.model, load_dygraph_pretrain(self.model,
self.config["Global"]["pretraine_model"]) self.config["Global"]["pretrained_model"])
else: else:
raise RuntimeError( raise RuntimeError(
"The best_model or pretraine_model should exist to generate inference model" "The best_model or pretraine_model should exist to generate inference model"

View File

@ -1,5 +0,0 @@
PADDLE_TRAINER_ENDPOINTS:
127.0.0.1:51466
127.0.0.1:58283
127.0.0.1:34005
127.0.0.1:58331