From 58639746455264eea09edaf67460ccdd47db14e5 Mon Sep 17 00:00:00 2001 From: gaotingquan Date: Tue, 18 Oct 2022 07:18:08 +0000 Subject: [PATCH] fix: update VAN_tiny to VAN_B0 --- ppcls/arch/backbone/__init__.py | 2 +- ppcls/arch/backbone/model_zoo/van.py | 6 +++--- ppcls/configs/ImageNet/VAN/{VAN_tiny.yaml => VAN_B0.yaml} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename ppcls/configs/ImageNet/VAN/{VAN_tiny.yaml => VAN_B0.yaml} (99%) diff --git a/ppcls/arch/backbone/__init__.py b/ppcls/arch/backbone/__init__.py index 49d47bb7..669547c8 100644 --- a/ppcls/arch/backbone/__init__.py +++ b/ppcls/arch/backbone/__init__.py @@ -66,7 +66,7 @@ from .model_zoo.cspnet import CSPDarkNet53 from .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 .model_zoo.mobilevit import MobileViT_XXS, MobileViT_XS, MobileViT_S from .model_zoo.repvgg import RepVGG_A0, RepVGG_A1, RepVGG_A2, RepVGG_B0, RepVGG_B1, RepVGG_B2, RepVGG_B1g2, RepVGG_B1g4, RepVGG_B2g4, RepVGG_B3g4 -from .model_zoo.van import VAN_tiny +from .model_zoo.van import VAN_B0 from .model_zoo.peleenet import PeleeNet from .model_zoo.convnext import ConvNeXt_tiny from .model_zoo.cae import cae_base_patch16_224, cae_large_patch16_224 diff --git a/ppcls/arch/backbone/model_zoo/van.py b/ppcls/arch/backbone/model_zoo/van.py index c4d73392..febf4511 100644 --- a/ppcls/arch/backbone/model_zoo/van.py +++ b/ppcls/arch/backbone/model_zoo/van.py @@ -24,7 +24,7 @@ from paddle.nn.initializer import TruncatedNormal, Constant from ....utils.save_load import load_dygraph_pretrain, load_dygraph_pretrain_from_url MODEL_URLS = { - "VAN_tiny": "", # TODO + "VAN_B0": "", # TODO } __all__ = list(MODEL_URLS.keys()) @@ -306,7 +306,7 @@ def _load_pretrained(pretrained, model, model_url, use_ssld=False): ) -def VAN_tiny(pretrained=False, use_ssld=False, **kwargs): +def VAN_B0(pretrained=False, use_ssld=False, **kwargs): model = VAN(embed_dims=[32, 64, 160, 256], mlp_ratios=[8, 8, 4, 4], norm_layer=partial( @@ -314,5 +314,5 @@ def VAN_tiny(pretrained=False, use_ssld=False, **kwargs): depths=[3, 3, 5, 2], **kwargs) _load_pretrained( - pretrained, model, MODEL_URLS["VAN_tiny"], use_ssld=use_ssld) + pretrained, model, MODEL_URLS["VAN_B0"], use_ssld=use_ssld) return model diff --git a/ppcls/configs/ImageNet/VAN/VAN_tiny.yaml b/ppcls/configs/ImageNet/VAN/VAN_B0.yaml similarity index 99% rename from ppcls/configs/ImageNet/VAN/VAN_tiny.yaml rename to ppcls/configs/ImageNet/VAN/VAN_B0.yaml index ae08dcfa..d72f0fae 100644 --- a/ppcls/configs/ImageNet/VAN/VAN_tiny.yaml +++ b/ppcls/configs/ImageNet/VAN/VAN_B0.yaml @@ -18,7 +18,7 @@ Global: # model architecture Arch: - name: VAN_tiny + name: VAN_B0 class_num: 1000 drop_path_rate: 0.1 drop_rate: 0.0 -- GitLab