提交 56c72a85 编写于 作者: G gaotingquan 提交者: Tingquan Gao

fix: fix lr

上级 a0f55cd4
...@@ -60,10 +60,10 @@ from ppcls.arch.backbone.model_zoo.rednet import RedNet26, RedNet38, RedNet50, R ...@@ -60,10 +60,10 @@ from ppcls.arch.backbone.model_zoo.rednet import RedNet26, RedNet38, RedNet50, R
from ppcls.arch.backbone.model_zoo.tnt import TNT_small from ppcls.arch.backbone.model_zoo.tnt import TNT_small
from ppcls.arch.backbone.model_zoo.hardnet import HarDNet68, HarDNet85, HarDNet39_ds, HarDNet68_ds from ppcls.arch.backbone.model_zoo.hardnet import HarDNet68, HarDNet85, HarDNet39_ds, HarDNet68_ds
from ppcls.arch.backbone.model_zoo.cspnet import CSPDarkNet53 from ppcls.arch.backbone.model_zoo.cspnet import CSPDarkNet53
from ppcls.arch.backbone.model_zoo.pvt_v2 import PVT_V2_B0, PVT_V2_B1, PVT_V2_B2_Linear, PVT_V2_B2, PVT_V2_B3, PVT_V2_B4, PVT_V2_B5
from ppcls.arch.backbone.variant_models.resnet_variant import ResNet50_last_stage_stride1 from ppcls.arch.backbone.variant_models.resnet_variant import ResNet50_last_stage_stride1
from ppcls.arch.backbone.variant_models.vgg_variant import VGG19Sigmoid from ppcls.arch.backbone.variant_models.vgg_variant import VGG19Sigmoid
from ppcls.arch.backbone.variant_models.pp_lcnet_variant import PPLCNet_x2_5_Tanh from ppcls.arch.backbone.variant_models.pp_lcnet_variant import PPLCNet_x2_5_Tanh
from ppcls.arch.backbone.model_zoo.pvt_v2 import PVT_V2_B0, PVT_V2_B1, PVT_V2_B2_Linear, PVT_V2_B2, PVT_V2_B3, PVT_V2_B4, PVT_V2_B5
# help whl get all the models' api (class type) and components' api (func type) # help whl get all the models' api (class type) and components' api (func type)
......
...@@ -95,7 +95,7 @@ class Attention(nn.Layer): ...@@ -95,7 +95,7 @@ class Attention(nn.Layer):
sr_ratio=1, sr_ratio=1,
linear=False): linear=False):
super().__init__() super().__init__()
assert dim % num_heads == 0, f"dim {dim} should be divided by num_heads {num_heads}." assert dim % num_heads == 0
self.dim = dim self.dim = dim
self.num_heads = num_heads self.num_heads = num_heads
...@@ -195,7 +195,6 @@ class Block(nn.Layer): ...@@ -195,7 +195,6 @@ class Block(nn.Layer):
proj_drop=drop, proj_drop=drop,
sr_ratio=sr_ratio, sr_ratio=sr_ratio,
linear=linear) linear=linear)
# NOTE: drop path for stochastic depth, we shall see if this is better than dropout here
self.drop_path = DropPath(drop_path) if drop_path > 0. else Identity() self.drop_path = DropPath(drop_path) if drop_path > 0. else Identity()
self.norm2 = norm_layer(dim) self.norm2 = norm_layer(dim)
mlp_hidden_dim = int(dim * mlp_ratio) mlp_hidden_dim = int(dim * mlp_ratio)
......
...@@ -44,7 +44,7 @@ Optimizer: ...@@ -44,7 +44,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -44,7 +44,7 @@ Optimizer: ...@@ -44,7 +44,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -44,7 +44,7 @@ Optimizer: ...@@ -44,7 +44,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -44,7 +44,7 @@ Optimizer: ...@@ -44,7 +44,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -45,7 +45,7 @@ Optimizer: ...@@ -45,7 +45,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -45,7 +45,7 @@ Optimizer: ...@@ -45,7 +45,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -45,7 +45,7 @@ Optimizer: ...@@ -45,7 +45,7 @@ Optimizer:
one_dim_param_no_weight_decay: True one_dim_param_no_weight_decay: True
lr: lr:
name: Cosine name: Cosine
learning_rate: 1e-3 learning_rate: 5e-4
eta_min: 1e-5 eta_min: 1e-5
warmup_epoch: 20 warmup_epoch: 20
warmup_start_lr: 1e-6 warmup_start_lr: 1e-6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P ...@@ -37,7 +37,7 @@ pretrained_model_url:https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/P
infer_model:../inference/ infer_model:../inference/
infer_export:True infer_export:True
infer_quant:Fasle infer_quant:Fasle
inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=384 -o PreProcess.transform_ops.1.CropImage.size=384 inference:python/predict_cls.py -c configs/inference_cls.yaml -o PreProcess.transform_ops.0.ResizeImage.resize_short=256 -o PreProcess.transform_ops.1.CropImage.size=224
-o Global.use_gpu:True|False -o Global.use_gpu:True|False
-o Global.enable_mkldnn:True|False -o Global.enable_mkldnn:True|False
-o Global.cpu_num_threads:1|6 -o Global.cpu_num_threads:1|6
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册