提交 51d71016 编写于 作者: H HydrogenSulfate

support web link for 'Global.pretrained_model' when export models

上级 0288285c
......@@ -548,7 +548,10 @@ class Engine(object):
"use_multilabel",
False) or "ATTRMetric" in self.config["Metric"]["Eval"][0]
model = ExportModel(self.config["Arch"], self.model, use_multilabel)
if self.config["Global"]["pretrained_model"] is not None:
if self.config["Global"]["pretrained_model"].startswith("http"):
load_dygraph_pretrain_from_url(
model.base_model, self.config["Global"]["pretrained_model"])
else:
load_dygraph_pretrain(model.base_model,
self.config["Global"]["pretrained_model"])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册