diff --git a/docs/en/tutorials/quick_start_en.md b/docs/en/tutorials/quick_start_en.md index 473c43ef54ed0087db22fa3adb2379be642682dc..840ce547a0f649c40deb1c4b66cb24079ddd07cf 100644 --- a/docs/en/tutorials/quick_start_en.md +++ b/docs/en/tutorials/quick_start_en.md @@ -107,7 +107,7 @@ Note: when finetuning model, which has been trained by SSLD, please use smaller ARCHITECTURE: name: 'ResNet50_vd' params: - lr_mult_list: [0.1, 0.1, 0.2, 0.2, 0.3] + lr_mult_list: [0.5, 0.5, 0.6, 0.6, 0.8] pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained" ``` diff --git a/docs/zh_CN/tutorials/quick_start.md b/docs/zh_CN/tutorials/quick_start.md index 5c88bd0c109c7f6edebc5f1f047e53cff8ad521f..09c35a9ddeb7d2d54c37a85bed68928f86ab50b8 100644 --- a/docs/zh_CN/tutorials/quick_start.md +++ b/docs/zh_CN/tutorials/quick_start.md @@ -108,7 +108,7 @@ python -m paddle.distributed.launch \ ARCHITECTURE: name: 'ResNet50_vd' params: - lr_mult_list: [0.1, 0.1, 0.2, 0.2, 0.3] + lr_mult_list: [0.5, 0.5, 0.6, 0.6, 0.8] pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained" ``` diff --git a/ppcls/modeling/architectures/resnet_vd.py b/ppcls/modeling/architectures/resnet_vd.py index 8b7254778babd96a904f49ed4e00886c4447be62..5867261df341d00df15fe4c2e4a20584b6b0388d 100644 --- a/ppcls/modeling/architectures/resnet_vd.py +++ b/ppcls/modeling/architectures/resnet_vd.py @@ -64,8 +64,10 @@ class ConvBNLayer(nn.Layer): self._batch_norm = BatchNorm( num_filters, act=act, - param_attr=ParamAttr(name=bn_name + '_scale'), - bias_attr=ParamAttr(bn_name + '_offset'), + param_attr=ParamAttr( + name=bn_name + '_scale', learning_rate=lr_mult), + bias_attr=ParamAttr( + bn_name + '_offset', learning_rate=lr_mult), moving_mean_name=bn_name + '_mean', moving_variance_name=bn_name + '_variance') @@ -118,6 +120,7 @@ class BottleneckBlock(nn.Layer): filter_size=1, stride=1, is_vd_mode=False if if_first else True, + lr_mult=lr_mult, name=name + "_branch1") self.shortcut = shortcut @@ -153,12 +156,14 @@ class BasicBlock(nn.Layer): filter_size=3, stride=stride, act='relu', + lr_mult=lr_mult, name=name + "_branch2a") self.conv1 = ConvBNLayer( num_channels=num_filters, num_filters=num_filters, filter_size=3, act=None, + lr_mult=lr_mult, name=name + "_branch2b") if not shortcut: @@ -168,6 +173,7 @@ class BasicBlock(nn.Layer): filter_size=1, stride=1, is_vd_mode=False if if_first else True, + lr_mult=lr_mult, name=name + "_branch1") self.shortcut = shortcut