提交 a5a3b0f5 编写于 作者: weixin_46524038's avatar weixin_46524038 提交者: cuicheng01

Delete unnecessary files

上级 272e7536
......@@ -64,10 +64,20 @@ def load_dygraph_pretrain(model, path=None):
return
def load_dygraph_pretrain_from_url(model, pretrained_url, use_ssld=False):
def load_dygraph_pretrain_from_url(model,
pretrained_url,
use_ssld=False,
use_imagenet22k_pretrained=False,
use_imagenet22kto1k_pretrained=False):
if use_ssld:
pretrained_url = pretrained_url.replace("_pretrained",
"_ssld_pretrained")
if use_imagenet22k_pretrained:
pretrained_url = pretrained_url.replace("_pretrained",
"_22k_pretrained")
if use_imagenet22kto1k_pretrained:
pretrained_url = pretrained_url.replace("_pretrained",
"_22kto1k_pretrained")
local_weight_path = get_weights_path_from_url(pretrained_url).replace(
".pdparams", "")
load_dygraph_pretrain(model, path=local_weight_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册