未验证 提交 ee5121a3 编写于 作者: C cuicheng01 提交者: GitHub

Merge branch 'PaddlePaddle:develop' into develop

...@@ -319,7 +319,7 @@ class ResNet(TheseusLayer): ...@@ -319,7 +319,7 @@ class ResNet(TheseusLayer):
[[input_image_channel, 32, 3, 2], [32, 32, 3, 1], [32, 64, 3, 1]] [[input_image_channel, 32, 3, 2], [32, 32, 3, 1], [32, 64, 3, 1]]
} }
self.stem = nn.Sequential(* [ self.stem = nn.Sequential(*[
ConvBNLayer( ConvBNLayer(
num_channels=in_c, num_channels=in_c,
num_filters=out_c, num_filters=out_c,
...@@ -385,7 +385,10 @@ def _load_pretrained(pretrained, model, model_url, use_ssld): ...@@ -385,7 +385,10 @@ def _load_pretrained(pretrained, model, model_url, use_ssld):
elif pretrained is True: elif pretrained is True:
load_dygraph_pretrain_from_url(model, model_url, use_ssld=use_ssld) load_dygraph_pretrain_from_url(model, model_url, use_ssld=use_ssld)
elif isinstance(pretrained, str): elif isinstance(pretrained, str):
load_dygraph_pretrain(model, pretrained) if 'http' in pretrained:
load_dygraph_pretrain_from_url(model, pretrained, use_ssld=False)
else:
load_dygraph_pretrain(model, pretrained)
else: else:
raise RuntimeError( raise RuntimeError(
"pretrained type is not available. Please use `string` or `boolean` type." "pretrained type is not available. Please use `string` or `boolean` type."
......
...@@ -24,7 +24,7 @@ Arch: ...@@ -24,7 +24,7 @@ Arch:
infer_add_softmax: False infer_add_softmax: False
Backbone: Backbone:
name: "ResNet50" name: "ResNet50"
pretrained: True pretrained: https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/others/resnet50-19c8e357_torch2paddle.pdparams
stem_act: null stem_act: null
BackboneStopLayer: BackboneStopLayer:
name: "flatten" name: "flatten"
......
...@@ -24,7 +24,7 @@ Arch: ...@@ -24,7 +24,7 @@ Arch:
infer_add_softmax: False infer_add_softmax: False
Backbone: Backbone:
name: "ResNet50_last_stage_stride1" name: "ResNet50_last_stage_stride1"
pretrained: True pretrained: https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/others/resnet50-19c8e357_torch2paddle.pdparams
stem_act: null stem_act: null
BackboneStopLayer: BackboneStopLayer:
name: "flatten" name: "flatten"
......
...@@ -24,7 +24,7 @@ Arch: ...@@ -24,7 +24,7 @@ Arch:
infer_add_softmax: False infer_add_softmax: False
Backbone: Backbone:
name: "ResNet50_last_stage_stride1" name: "ResNet50_last_stage_stride1"
pretrained: True pretrained: https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/others/resnet50-19c8e357_torch2paddle.pdparams
stem_act: null stem_act: null
BackboneStopLayer: BackboneStopLayer:
name: "flatten" name: "flatten"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册