diff --git a/ppcls/engine/engine.py b/ppcls/engine/engine.py index 3d255a3ab781442541b2f5df6d8af44a8bbe8079..62d59d93680a42b68f2df65347aeec746e0d4df3 100755 --- a/ppcls/engine/engine.py +++ b/ppcls/engine/engine.py @@ -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"])