From f6da3bd60a01c700c79c268b8b81595ccc3e007c Mon Sep 17 00:00:00 2001 From: weishengyu Date: Mon, 24 May 2021 11:42:24 +0800 Subject: [PATCH] move files --- .gitignore | 1 - ppcls/__init__.py | 2 +- ppcls/{modeling => arch}/__init__.py | 5 +- .../backbone}/__init__.py | 0 .../backbone}/alexnet.py | 0 ppcls/arch/backbone/base/__init__.py | 0 ppcls/arch/backbone/base/theseus_layer.py | 63 +++++++++++++++++++ .../backbone}/darknet.py | 0 .../backbone}/densenet.py | 0 .../backbone}/distillation_models.py | 0 .../backbone}/distilled_vision_transformer.py | 0 .../architectures => arch/backbone}/dpn.py | 0 .../backbone}/efficientnet.py | 0 .../backbone}/ghostnet.py | 0 .../backbone}/googlenet.py | 0 .../architectures => arch/backbone}/hrnet.py | 0 .../backbone}/inception_v3.py | 0 .../backbone}/inception_v4.py | 0 .../architectures => arch/backbone}/mixnet.py | 0 .../backbone}/mobilenet_v1.py | 0 .../backbone}/mobilenet_v2.py | 0 .../backbone}/mobilenet_v3.py | 0 .../architectures => arch/backbone}/regnet.py | 0 .../architectures => arch/backbone}/repvgg.py | 0 .../backbone}/res2net.py | 0 .../backbone}/res2net_vd.py | 0 .../backbone}/resnest.py | 0 .../architectures => arch/backbone}/resnet.py | 0 .../backbone}/resnet_vc.py | 0 .../backbone}/resnet_vd.py | 0 .../backbone}/resnext.py | 0 .../backbone}/resnext101_wsl.py | 0 .../backbone}/resnext_vd.py | 0 .../architectures => arch/backbone}/rexnet.py | 0 .../backbone}/se_resnet_vd.py | 0 .../backbone}/se_resnext.py | 0 .../backbone}/se_resnext_vd.py | 0 .../backbone}/shufflenet_v2.py | 0 .../backbone}/squeezenet.py | 0 .../backbone}/swin_transformer.py | 0 .../architectures => arch/backbone}/vgg.py | 0 .../backbone}/vision_transformer.py | 0 .../backbone}/xception.py | 0 .../backbone}/xception_deeplab.py | 0 ppcls/arch/loss&metrics/__init__.py | 0 ppcls/{modeling => arch/loss&metrics}/loss.py | 0 ppcls/{modeling => arch}/utils.py | 8 +-- .../configs}/AlexNet/AlexNet.yaml | 0 {configs => ppcls/configs}/DPN/DPN107.yaml | 0 {configs => ppcls/configs}/DPN/DPN131.yaml | 0 {configs => ppcls/configs}/DPN/DPN68.yaml | 0 {configs => ppcls/configs}/DPN/DPN92.yaml | 0 {configs => ppcls/configs}/DPN/DPN98.yaml | 0 .../configs}/DarkNet/DarkNet53.yaml | 0 .../DataAugment/ResNet50_AutoAugment.yaml | 0 .../DataAugment/ResNet50_Baseline.yaml | 0 .../configs}/DataAugment/ResNet50_Cutmix.yaml | 0 .../configs}/DataAugment/ResNet50_Cutout.yaml | 0 .../DataAugment/ResNet50_GridMask.yaml | 0 .../DataAugment/ResNet50_HideAndSeek.yaml | 0 .../configs}/DataAugment/ResNet50_Mixup.yaml | 0 .../DataAugment/ResNet50_RandAugment.yaml | 0 .../DataAugment/ResNet50_RandomErasing.yaml | 0 .../DeiT/DeiT_base_distilled_patch16_224.yaml | 0 .../DeiT/DeiT_base_distilled_patch16_384.yaml | 0 .../configs}/DeiT/DeiT_base_patch16_224.yaml | 0 .../configs}/DeiT/DeiT_base_patch16_384.yaml | 0 .../DeiT_small_distilled_patch16_224.yaml | 0 .../configs}/DeiT/DeiT_small_patch16_224.yaml | 0 .../DeiT/DeiT_tiny_distilled_patch16_224.yaml | 0 .../configs}/DeiT/DeiT_tiny_patch16_224.yaml | 0 .../configs}/DenseNet/DenseNet121.yaml | 0 .../configs}/DenseNet/DenseNet161.yaml | 0 .../configs}/DenseNet/DenseNet169.yaml | 0 .../configs}/DenseNet/DenseNet201.yaml | 0 .../configs}/DenseNet/DenseNet264.yaml | 0 .../R50_vd_distill_MV3_large_x1_0.yaml | 0 .../ResX101_32x16d_wsl_distill_R50_vd.yaml | 0 .../configs}/EfficientNet/EfficientNetB0.yaml | 0 .../configs}/GhostNet/GhostNet_x0_5.yaml | 0 .../configs}/GhostNet/GhostNet_x1_0.yaml | 0 .../configs}/GhostNet/GhostNet_x1_3.yaml | 0 .../configs}/HRNet/HRNet_W18_C.yaml | 0 .../configs}/HRNet/HRNet_W30_C.yaml | 0 .../configs}/HRNet/HRNet_W32_C.yaml | 0 .../configs}/HRNet/HRNet_W40_C.yaml | 0 .../configs}/HRNet/HRNet_W44_C.yaml | 0 .../configs}/HRNet/HRNet_W48_C.yaml | 0 .../configs}/HRNet/HRNet_W64_C.yaml | 0 .../configs}/Inception/GoogLeNet.yaml | 0 .../configs}/Inception/InceptionV3.yaml | 0 .../configs}/Inception/InceptionV4.yaml | 0 .../configs}/MixNet/MixNet_L.yaml | 0 .../configs}/MixNet/MixNet_M.yaml | 0 .../configs}/MixNet/MixNet_S.yaml | 0 .../configs}/MobileNetV1/MobileNetV1.yaml | 0 .../MobileNetV1/MobileNetV1_x0_25.yaml | 0 .../MobileNetV1/MobileNetV1_x0_5.yaml | 0 .../MobileNetV1/MobileNetV1_x0_75.yaml | 0 .../configs}/MobileNetV2/MobileNetV2.yaml | 0 .../MobileNetV2/MobileNetV2_x0_25.yaml | 0 .../MobileNetV2/MobileNetV2_x0_5.yaml | 0 .../MobileNetV2/MobileNetV2_x0_75.yaml | 0 .../MobileNetV2/MobileNetV2_x1_5.yaml | 0 .../MobileNetV2/MobileNetV2_x2_0.yaml | 0 .../MobileNetV3/MobileNetV3_large_x0_35.yaml | 0 .../MobileNetV3/MobileNetV3_large_x0_5.yaml | 0 .../MobileNetV3/MobileNetV3_large_x0_75.yaml | 0 .../MobileNetV3/MobileNetV3_large_x1_0.yaml | 0 .../MobileNetV3/MobileNetV3_large_x1_25.yaml | 0 .../MobileNetV3/MobileNetV3_small_x0_35.yaml | 0 .../MobileNetV3/MobileNetV3_small_x0_5.yaml | 0 .../MobileNetV3/MobileNetV3_small_x0_75.yaml | 0 .../MobileNetV3/MobileNetV3_small_x1_0.yaml | 0 .../MobileNetV3/MobileNetV3_small_x1_25.yaml | 0 .../configs}/ReXNet/ReXNet_1_0.yaml | 0 .../configs}/ReXNet/ReXNet_1_3.yaml | 0 .../configs}/ReXNet/ReXNet_1_5.yaml | 0 .../configs}/ReXNet/ReXNet_2_0.yaml | 0 .../configs}/ReXNet/ReXNet_3_0.yaml | 0 .../configs}/RegNet/RegNetX_4GF.yaml | 0 .../configs}/RepVGG/RepVGG_A0.yaml | 0 .../configs}/RepVGG/RepVGG_A1.yaml | 0 .../configs}/RepVGG/RepVGG_A2.yaml | 0 .../configs}/RepVGG/RepVGG_B0.yaml | 0 .../configs}/RepVGG/RepVGG_B1.yaml | 0 .../configs}/RepVGG/RepVGG_B1g2.yaml | 0 .../configs}/RepVGG/RepVGG_B1g4.yaml | 0 .../configs}/RepVGG/RepVGG_B2.yaml | 0 .../configs}/RepVGG/RepVGG_B2g2.yaml | 0 .../configs}/RepVGG/RepVGG_B2g4.yaml | 0 .../configs}/RepVGG/RepVGG_B3.yaml | 0 .../configs}/RepVGG/RepVGG_B3g2.yaml | 0 .../configs}/RepVGG/RepVGG_B3g4.yaml | 0 .../Res2Net/Res2Net101_vd_26w_4s.yaml | 0 .../Res2Net/Res2Net200_vd_26w_4s.yaml | 0 .../configs}/Res2Net/Res2Net50_14w_8s.yaml | 0 .../configs}/Res2Net/Res2Net50_26w_4s.yaml | 0 .../configs}/Res2Net/Res2Net50_vd_26w_4s.yaml | 0 .../configs}/ResNeSt/ResNeSt101.yaml | 0 .../configs}/ResNeSt/ResNeSt50.yaml | 0 .../ResNeSt/ResNeSt50_fast_1s1x64d.yaml | 0 .../configs}/ResNeXt/ResNeXt101_32x4d.yaml | 0 .../ResNeXt/ResNeXt101_32x4d_fp16.yaml | 0 .../configs}/ResNeXt/ResNeXt101_64x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt101_vd_32x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt101_vd_64x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt152_32x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt152_64x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt152_vd_32x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt152_vd_64x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt50_32x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt50_64x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt50_vd_32x4d.yaml | 0 .../configs}/ResNeXt/ResNeXt50_vd_64x4d.yaml | 0 .../ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml | 0 .../configs}/ResNet/ResNet101.yaml | 0 .../configs}/ResNet/ResNet101_vd.yaml | 0 .../configs}/ResNet/ResNet152.yaml | 0 .../configs}/ResNet/ResNet152_vd.yaml | 0 .../configs}/ResNet/ResNet18.yaml | 0 .../configs}/ResNet/ResNet18_vd.yaml | 0 .../configs}/ResNet/ResNet200_vd.yaml | 0 .../configs}/ResNet/ResNet34.yaml | 0 .../configs}/ResNet/ResNet34_vd.yaml | 0 .../configs}/ResNet/ResNet50.yaml | 0 .../configs}/ResNet/ResNet50_fp16.yaml | 0 .../configs}/ResNet/ResNet50_vc.yaml | 0 .../configs}/ResNet/ResNet50_vd.yaml | 0 .../configs}/SENet/SENet154_vd.yaml | 0 .../configs}/SENet/SE_ResNeXt101_32x4d.yaml | 0 .../SENet/SE_ResNeXt101_32x4d_fp16.yaml | 0 .../configs}/SENet/SE_ResNeXt50_32x4d.yaml | 0 .../configs}/SENet/SE_ResNeXt50_vd_32x4d.yaml | 0 .../configs}/SENet/SE_ResNet18_vd.yaml | 0 .../configs}/SENet/SE_ResNet34_vd.yaml | 0 .../configs}/SENet/SE_ResNet50_vd.yaml | 0 .../ShuffleNet/ShuffleNetV2_swish.yaml | 0 .../ShuffleNet/ShuffleNetV2_x0_25.yaml | 0 .../ShuffleNet/ShuffleNetV2_x0_33.yaml | 0 .../ShuffleNet/ShuffleNetV2_x0_5.yaml | 0 .../ShuffleNet/ShuffleNetV2_x1_0.yaml | 0 .../ShuffleNet/ShuffleNetV2_x1_5.yaml | 0 .../ShuffleNet/ShuffleNetV2_x2_0.yaml | 0 .../configs}/SqueezeNet/SqueezeNet1_0.yaml | 0 .../configs}/SqueezeNet/SqueezeNet1_1.yaml | 0 ...nTransformer_base_patch4_window12_384.yaml | 0 ...inTransformer_base_patch4_window7_224.yaml | 0 ...Transformer_large_patch4_window12_384.yaml | 0 ...nTransformer_large_patch4_window7_224.yaml | 0 ...nTransformer_small_patch4_window7_224.yaml | 0 ...inTransformer_tiny_patch4_window7_224.yaml | 0 {configs => ppcls/configs}/VGG/VGG11.yaml | 0 {configs => ppcls/configs}/VGG/VGG13.yaml | 0 {configs => ppcls/configs}/VGG/VGG16.yaml | 0 {configs => ppcls/configs}/VGG/VGG19.yaml | 0 .../ViT_base_patch16_224.yaml | 0 .../ViT_base_patch16_384.yaml | 0 .../ViT_base_patch32_384.yaml | 0 .../ViT_huge_patch16_224.yaml | 0 .../ViT_huge_patch32_384.yaml | 0 .../ViT_large_patch16_224.yaml | 0 .../ViT_large_patch16_384.yaml | 0 .../ViT_large_patch32_384.yaml | 0 .../ViT_small_patch16_224.yaml | 0 .../configs}/Xception/Xception41.yaml | 0 .../configs}/Xception/Xception41_deeplab.yaml | 0 .../configs}/Xception/Xception65.yaml | 0 .../configs}/Xception/Xception65_deeplab.yaml | 0 .../configs}/Xception/Xception71.yaml | 0 {configs => ppcls/configs}/eval.yaml | 0 .../HRNet_W18_C_finetune_kunlun.yaml | 0 .../MobileNetV3_large_x1_0_finetune.yaml | 0 .../R50_vd_distill_MV3_large_x1_0.yaml | 0 .../configs}/quick_start/ResNet50_vd.yaml | 0 .../quick_start/ResNet50_vd_finetune.yaml | 0 .../ResNet50_vd_finetune_kunlun.yaml | 0 .../quick_start/ResNet50_vd_multilabel.yaml | 0 .../ResNet50_vd_ssld_finetune.yaml | 0 ...Net50_vd_ssld_random_erasing_finetune.yaml | 0 .../quick_start/VGG16_finetune_kunlun.yaml | 0 .../quick_start/VGG19_finetune_kunlun.yaml | 0 .../new_user/ShuffleNetV2_x0_25.yaml | 0 ...ileNetV3_large_x1_0_CIFAR100_finetune.yaml | 0 ...50_vd_distill_MV3_large_x1_0_CIFAR100.yaml | 0 .../professional/ResNet50_vd_CIFAR100.yaml | 0 .../ResNet50_vd_CIFAR100_finetune.yaml | 0 .../ResNet50_vd_mixup_CIFAR100_finetune.yaml | 0 .../ResNet50_vd_ssld_CIFAR100_finetune.yaml | 0 ppcls/data/dataset/__init__.py | 0 ppcls/data/dataset/flowers102/__init__.py | 0 .../flowers102/generate_flowers102_list.py | 38 +++++++++++ ppcls/engine/__init__.py | 0 ppcls/promote/__init__.py | 0 ppcls/utils/check.py | 6 +- ppcls/utils/model_zoo.py | 2 +- 236 files changed, 112 insertions(+), 13 deletions(-) rename ppcls/{modeling => arch}/__init__.py (89%) rename ppcls/{modeling/architectures => arch/backbone}/__init__.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/alexnet.py (100%) create mode 100644 ppcls/arch/backbone/base/__init__.py create mode 100644 ppcls/arch/backbone/base/theseus_layer.py rename ppcls/{modeling/architectures => arch/backbone}/darknet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/densenet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/distillation_models.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/distilled_vision_transformer.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/dpn.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/efficientnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/ghostnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/googlenet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/hrnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/inception_v3.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/inception_v4.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/mixnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/mobilenet_v1.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/mobilenet_v2.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/mobilenet_v3.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/regnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/repvgg.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/res2net.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/res2net_vd.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnest.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnet_vc.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnet_vd.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnext.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnext101_wsl.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/resnext_vd.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/rexnet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/se_resnet_vd.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/se_resnext.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/se_resnext_vd.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/shufflenet_v2.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/squeezenet.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/swin_transformer.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/vgg.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/vision_transformer.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/xception.py (100%) rename ppcls/{modeling/architectures => arch/backbone}/xception_deeplab.py (100%) create mode 100644 ppcls/arch/loss&metrics/__init__.py rename ppcls/{modeling => arch/loss&metrics}/loss.py (100%) rename ppcls/{modeling => arch}/utils.py (87%) rename {configs => ppcls/configs}/AlexNet/AlexNet.yaml (100%) rename {configs => ppcls/configs}/DPN/DPN107.yaml (100%) rename {configs => ppcls/configs}/DPN/DPN131.yaml (100%) rename {configs => ppcls/configs}/DPN/DPN68.yaml (100%) rename {configs => ppcls/configs}/DPN/DPN92.yaml (100%) rename {configs => ppcls/configs}/DPN/DPN98.yaml (100%) rename {configs => ppcls/configs}/DarkNet/DarkNet53.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_AutoAugment.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_Baseline.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_Cutmix.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_Cutout.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_GridMask.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_HideAndSeek.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_Mixup.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_RandAugment.yaml (100%) rename {configs => ppcls/configs}/DataAugment/ResNet50_RandomErasing.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_base_distilled_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_base_distilled_patch16_384.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_base_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_base_patch16_384.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_small_distilled_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_small_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_tiny_distilled_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DeiT/DeiT_tiny_patch16_224.yaml (100%) rename {configs => ppcls/configs}/DenseNet/DenseNet121.yaml (100%) rename {configs => ppcls/configs}/DenseNet/DenseNet161.yaml (100%) rename {configs => ppcls/configs}/DenseNet/DenseNet169.yaml (100%) rename {configs => ppcls/configs}/DenseNet/DenseNet201.yaml (100%) rename {configs => ppcls/configs}/DenseNet/DenseNet264.yaml (100%) rename {configs => ppcls/configs}/Distillation/R50_vd_distill_MV3_large_x1_0.yaml (100%) rename {configs => ppcls/configs}/Distillation/ResX101_32x16d_wsl_distill_R50_vd.yaml (100%) rename {configs => ppcls/configs}/EfficientNet/EfficientNetB0.yaml (100%) rename {configs => ppcls/configs}/GhostNet/GhostNet_x0_5.yaml (100%) rename {configs => ppcls/configs}/GhostNet/GhostNet_x1_0.yaml (100%) rename {configs => ppcls/configs}/GhostNet/GhostNet_x1_3.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W18_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W30_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W32_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W40_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W44_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W48_C.yaml (100%) rename {configs => ppcls/configs}/HRNet/HRNet_W64_C.yaml (100%) rename {configs => ppcls/configs}/Inception/GoogLeNet.yaml (100%) rename {configs => ppcls/configs}/Inception/InceptionV3.yaml (100%) rename {configs => ppcls/configs}/Inception/InceptionV4.yaml (100%) rename {configs => ppcls/configs}/MixNet/MixNet_L.yaml (100%) rename {configs => ppcls/configs}/MixNet/MixNet_M.yaml (100%) rename {configs => ppcls/configs}/MixNet/MixNet_S.yaml (100%) rename {configs => ppcls/configs}/MobileNetV1/MobileNetV1.yaml (100%) rename {configs => ppcls/configs}/MobileNetV1/MobileNetV1_x0_25.yaml (100%) rename {configs => ppcls/configs}/MobileNetV1/MobileNetV1_x0_5.yaml (100%) rename {configs => ppcls/configs}/MobileNetV1/MobileNetV1_x0_75.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2_x0_25.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2_x0_5.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2_x0_75.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2_x1_5.yaml (100%) rename {configs => ppcls/configs}/MobileNetV2/MobileNetV2_x2_0.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_large_x0_35.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_large_x0_5.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_large_x0_75.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_large_x1_0.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_large_x1_25.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_small_x0_35.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_small_x0_5.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_small_x0_75.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_small_x1_0.yaml (100%) rename {configs => ppcls/configs}/MobileNetV3/MobileNetV3_small_x1_25.yaml (100%) rename {configs => ppcls/configs}/ReXNet/ReXNet_1_0.yaml (100%) rename {configs => ppcls/configs}/ReXNet/ReXNet_1_3.yaml (100%) rename {configs => ppcls/configs}/ReXNet/ReXNet_1_5.yaml (100%) rename {configs => ppcls/configs}/ReXNet/ReXNet_2_0.yaml (100%) rename {configs => ppcls/configs}/ReXNet/ReXNet_3_0.yaml (100%) rename {configs => ppcls/configs}/RegNet/RegNetX_4GF.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_A0.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_A1.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_A2.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B0.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B1.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B1g2.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B1g4.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B2.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B2g2.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B2g4.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B3.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B3g2.yaml (100%) rename {configs => ppcls/configs}/RepVGG/RepVGG_B3g4.yaml (100%) rename {configs => ppcls/configs}/Res2Net/Res2Net101_vd_26w_4s.yaml (100%) rename {configs => ppcls/configs}/Res2Net/Res2Net200_vd_26w_4s.yaml (100%) rename {configs => ppcls/configs}/Res2Net/Res2Net50_14w_8s.yaml (100%) rename {configs => ppcls/configs}/Res2Net/Res2Net50_26w_4s.yaml (100%) rename {configs => ppcls/configs}/Res2Net/Res2Net50_vd_26w_4s.yaml (100%) rename {configs => ppcls/configs}/ResNeSt/ResNeSt101.yaml (100%) rename {configs => ppcls/configs}/ResNeSt/ResNeSt50.yaml (100%) rename {configs => ppcls/configs}/ResNeSt/ResNeSt50_fast_1s1x64d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt101_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt101_32x4d_fp16.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt101_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt101_vd_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt101_vd_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt152_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt152_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt152_vd_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt152_vd_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt50_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt50_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt50_vd_32x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt/ResNeXt50_vd_64x4d.yaml (100%) rename {configs => ppcls/configs}/ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet101.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet101_vd.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet152.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet152_vd.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet18.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet18_vd.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet200_vd.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet34.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet34_vd.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet50.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet50_fp16.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet50_vc.yaml (100%) rename {configs => ppcls/configs}/ResNet/ResNet50_vd.yaml (100%) rename {configs => ppcls/configs}/SENet/SENet154_vd.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNeXt101_32x4d.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNeXt101_32x4d_fp16.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNeXt50_32x4d.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNeXt50_vd_32x4d.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNet18_vd.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNet34_vd.yaml (100%) rename {configs => ppcls/configs}/SENet/SE_ResNet50_vd.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_swish.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x0_25.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x0_33.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x0_5.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x1_0.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x1_5.yaml (100%) rename {configs => ppcls/configs}/ShuffleNet/ShuffleNetV2_x2_0.yaml (100%) rename {configs => ppcls/configs}/SqueezeNet/SqueezeNet1_0.yaml (100%) rename {configs => ppcls/configs}/SqueezeNet/SqueezeNet1_1.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_base_patch4_window12_384.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_base_patch4_window7_224.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_large_patch4_window12_384.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_large_patch4_window7_224.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_small_patch4_window7_224.yaml (100%) rename {configs => ppcls/configs}/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml (100%) rename {configs => ppcls/configs}/VGG/VGG11.yaml (100%) rename {configs => ppcls/configs}/VGG/VGG13.yaml (100%) rename {configs => ppcls/configs}/VGG/VGG16.yaml (100%) rename {configs => ppcls/configs}/VGG/VGG19.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_base_patch16_224.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_base_patch16_384.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_base_patch32_384.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_huge_patch16_224.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_huge_patch32_384.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_large_patch16_224.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_large_patch16_384.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_large_patch32_384.yaml (100%) rename {configs => ppcls/configs}/VisionTransformer/ViT_small_patch16_224.yaml (100%) rename {configs => ppcls/configs}/Xception/Xception41.yaml (100%) rename {configs => ppcls/configs}/Xception/Xception41_deeplab.yaml (100%) rename {configs => ppcls/configs}/Xception/Xception65.yaml (100%) rename {configs => ppcls/configs}/Xception/Xception65_deeplab.yaml (100%) rename {configs => ppcls/configs}/Xception/Xception71.yaml (100%) rename {configs => ppcls/configs}/eval.yaml (100%) rename {configs => ppcls/configs}/quick_start/HRNet_W18_C_finetune_kunlun.yaml (100%) rename {configs => ppcls/configs}/quick_start/MobileNetV3_large_x1_0_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/R50_vd_distill_MV3_large_x1_0.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd_finetune_kunlun.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd_multilabel.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd_ssld_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/VGG16_finetune_kunlun.yaml (100%) rename {configs => ppcls/configs}/quick_start/VGG19_finetune_kunlun.yaml (100%) rename {configs => ppcls/configs}/quick_start/new_user/ShuffleNetV2_x0_25.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/MobileNetV3_large_x1_0_CIFAR100_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/R50_vd_distill_MV3_large_x1_0_CIFAR100.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/ResNet50_vd_CIFAR100.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/ResNet50_vd_CIFAR100_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/ResNet50_vd_mixup_CIFAR100_finetune.yaml (100%) rename {configs => ppcls/configs}/quick_start/professional/ResNet50_vd_ssld_CIFAR100_finetune.yaml (100%) create mode 100644 ppcls/data/dataset/__init__.py create mode 100644 ppcls/data/dataset/flowers102/__init__.py create mode 100644 ppcls/data/dataset/flowers102/generate_flowers102_list.py create mode 100644 ppcls/engine/__init__.py create mode 100644 ppcls/promote/__init__.py diff --git a/.gitignore b/.gitignore index c2d80520..8f00d034 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ __pycache__/ *.pyc *.sw* */workerlog* -dataset/ checkpoints/ output/ pretrained/ diff --git a/ppcls/__init__.py b/ppcls/__init__.py index 3cee4418..d6cdb6f8 100644 --- a/ppcls/__init__.py +++ b/ppcls/__init__.py @@ -14,7 +14,7 @@ from . import optimizer -from .modeling import * +from .arch import * from .optimizer import * from .data import * from .utils import * diff --git a/ppcls/modeling/__init__.py b/ppcls/arch/__init__.py similarity index 89% rename from ppcls/modeling/__init__.py rename to ppcls/arch/__init__.py index e9754269..ec5529cc 100644 --- a/ppcls/modeling/__init__.py +++ b/ppcls/arch/__init__.py @@ -12,9 +12,8 @@ #See the License for the specific language governing permissions and #limitations under the License. -from . import architectures -from . import loss +from . import backbone -from .architectures import * +from .backbone import * from .loss import * from .utils import * diff --git a/ppcls/modeling/architectures/__init__.py b/ppcls/arch/backbone/__init__.py similarity index 100% rename from ppcls/modeling/architectures/__init__.py rename to ppcls/arch/backbone/__init__.py diff --git a/ppcls/modeling/architectures/alexnet.py b/ppcls/arch/backbone/alexnet.py similarity index 100% rename from ppcls/modeling/architectures/alexnet.py rename to ppcls/arch/backbone/alexnet.py diff --git a/ppcls/arch/backbone/base/__init__.py b/ppcls/arch/backbone/base/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/arch/backbone/base/theseus_layer.py b/ppcls/arch/backbone/base/theseus_layer.py new file mode 100644 index 00000000..1757b827 --- /dev/null +++ b/ppcls/arch/backbone/base/theseus_layer.py @@ -0,0 +1,63 @@ +from abc import ABC +from paddle import nn +import re + + +class Identity(nn.Layer): + def __init__(self): + super(Identity, self).__init__() + + def forward(self, inputs): + return inputs + + +class TheseusLayer(nn.Layer, ABC): + def __init__(self, *args, return_patterns=None, stop_layer=None, **kwargs): + super(TheseusLayer, self).__init__() + self.res_dict = None + self.register_forward_post_hook(self._disconnect_res_dict_hook) + if return_patterns is not None or stop_layer is not None: + self._update_sub(return_patterns, stop_layer) + + def forward(self, *input, res_dict=None, **kwargs): + if res_dict is not None: + self.res_dict = res_dict + + def _update_sub(self, return_layers, stop_layer): + after_stop = False + for layer_i in self._sub_layers: + layer_name = self._sub_layers[layer_i].full_name() + if stop_layer is not None and layer_name == stop_layer: + after_stop = True + if after_stop: + self._sub_layers[layer_i] = Identity() + for return_pattern in return_layers: + if return_layers is not None and re.match(return_pattern, layer_name): + self._sub_layers[layer_i].register_forward_post_hook(self._save_sub_res_hook) + + def _save_sub_res_hook(self, layer, input, output): + self.res_dict[layer.full_name()] = output + + def _disconnect_res_dict_hook(self, input, output): + self.res_dict = None + + def replace_sub(self, layer_name_pattern, replace_function, recursive=True): + for layer_i in self._sub_layers: + layer_name = self._sub_layers[layer_i].full_name() + if re.match(layer_name_pattern, layer_name): + self._sub_layers[layer_i] = replace_function(self._sub_layers[layer_i]) + if recursive and isinstance(self._sub_layers[layer_i], TheseusLayer): + self._sub_layers[layer_i].replace_sub(layer_name_pattern, replace_function, recursive) + + ''' + example of replace function: + def replace_conv(origin_conv: nn.Conv2D): + new_conv = nn.Conv2D( + in_channels=origin_conv._in_channels, + out_channels=origin_conv._out_channels, + kernel_size=origin_conv._kernel_size, + stride=2 + ) + return new_conv + + ''' \ No newline at end of file diff --git a/ppcls/modeling/architectures/darknet.py b/ppcls/arch/backbone/darknet.py similarity index 100% rename from ppcls/modeling/architectures/darknet.py rename to ppcls/arch/backbone/darknet.py diff --git a/ppcls/modeling/architectures/densenet.py b/ppcls/arch/backbone/densenet.py similarity index 100% rename from ppcls/modeling/architectures/densenet.py rename to ppcls/arch/backbone/densenet.py diff --git a/ppcls/modeling/architectures/distillation_models.py b/ppcls/arch/backbone/distillation_models.py similarity index 100% rename from ppcls/modeling/architectures/distillation_models.py rename to ppcls/arch/backbone/distillation_models.py diff --git a/ppcls/modeling/architectures/distilled_vision_transformer.py b/ppcls/arch/backbone/distilled_vision_transformer.py similarity index 100% rename from ppcls/modeling/architectures/distilled_vision_transformer.py rename to ppcls/arch/backbone/distilled_vision_transformer.py diff --git a/ppcls/modeling/architectures/dpn.py b/ppcls/arch/backbone/dpn.py similarity index 100% rename from ppcls/modeling/architectures/dpn.py rename to ppcls/arch/backbone/dpn.py diff --git a/ppcls/modeling/architectures/efficientnet.py b/ppcls/arch/backbone/efficientnet.py similarity index 100% rename from ppcls/modeling/architectures/efficientnet.py rename to ppcls/arch/backbone/efficientnet.py diff --git a/ppcls/modeling/architectures/ghostnet.py b/ppcls/arch/backbone/ghostnet.py similarity index 100% rename from ppcls/modeling/architectures/ghostnet.py rename to ppcls/arch/backbone/ghostnet.py diff --git a/ppcls/modeling/architectures/googlenet.py b/ppcls/arch/backbone/googlenet.py similarity index 100% rename from ppcls/modeling/architectures/googlenet.py rename to ppcls/arch/backbone/googlenet.py diff --git a/ppcls/modeling/architectures/hrnet.py b/ppcls/arch/backbone/hrnet.py similarity index 100% rename from ppcls/modeling/architectures/hrnet.py rename to ppcls/arch/backbone/hrnet.py diff --git a/ppcls/modeling/architectures/inception_v3.py b/ppcls/arch/backbone/inception_v3.py similarity index 100% rename from ppcls/modeling/architectures/inception_v3.py rename to ppcls/arch/backbone/inception_v3.py diff --git a/ppcls/modeling/architectures/inception_v4.py b/ppcls/arch/backbone/inception_v4.py similarity index 100% rename from ppcls/modeling/architectures/inception_v4.py rename to ppcls/arch/backbone/inception_v4.py diff --git a/ppcls/modeling/architectures/mixnet.py b/ppcls/arch/backbone/mixnet.py similarity index 100% rename from ppcls/modeling/architectures/mixnet.py rename to ppcls/arch/backbone/mixnet.py diff --git a/ppcls/modeling/architectures/mobilenet_v1.py b/ppcls/arch/backbone/mobilenet_v1.py similarity index 100% rename from ppcls/modeling/architectures/mobilenet_v1.py rename to ppcls/arch/backbone/mobilenet_v1.py diff --git a/ppcls/modeling/architectures/mobilenet_v2.py b/ppcls/arch/backbone/mobilenet_v2.py similarity index 100% rename from ppcls/modeling/architectures/mobilenet_v2.py rename to ppcls/arch/backbone/mobilenet_v2.py diff --git a/ppcls/modeling/architectures/mobilenet_v3.py b/ppcls/arch/backbone/mobilenet_v3.py similarity index 100% rename from ppcls/modeling/architectures/mobilenet_v3.py rename to ppcls/arch/backbone/mobilenet_v3.py diff --git a/ppcls/modeling/architectures/regnet.py b/ppcls/arch/backbone/regnet.py similarity index 100% rename from ppcls/modeling/architectures/regnet.py rename to ppcls/arch/backbone/regnet.py diff --git a/ppcls/modeling/architectures/repvgg.py b/ppcls/arch/backbone/repvgg.py similarity index 100% rename from ppcls/modeling/architectures/repvgg.py rename to ppcls/arch/backbone/repvgg.py diff --git a/ppcls/modeling/architectures/res2net.py b/ppcls/arch/backbone/res2net.py similarity index 100% rename from ppcls/modeling/architectures/res2net.py rename to ppcls/arch/backbone/res2net.py diff --git a/ppcls/modeling/architectures/res2net_vd.py b/ppcls/arch/backbone/res2net_vd.py similarity index 100% rename from ppcls/modeling/architectures/res2net_vd.py rename to ppcls/arch/backbone/res2net_vd.py diff --git a/ppcls/modeling/architectures/resnest.py b/ppcls/arch/backbone/resnest.py similarity index 100% rename from ppcls/modeling/architectures/resnest.py rename to ppcls/arch/backbone/resnest.py diff --git a/ppcls/modeling/architectures/resnet.py b/ppcls/arch/backbone/resnet.py similarity index 100% rename from ppcls/modeling/architectures/resnet.py rename to ppcls/arch/backbone/resnet.py diff --git a/ppcls/modeling/architectures/resnet_vc.py b/ppcls/arch/backbone/resnet_vc.py similarity index 100% rename from ppcls/modeling/architectures/resnet_vc.py rename to ppcls/arch/backbone/resnet_vc.py diff --git a/ppcls/modeling/architectures/resnet_vd.py b/ppcls/arch/backbone/resnet_vd.py similarity index 100% rename from ppcls/modeling/architectures/resnet_vd.py rename to ppcls/arch/backbone/resnet_vd.py diff --git a/ppcls/modeling/architectures/resnext.py b/ppcls/arch/backbone/resnext.py similarity index 100% rename from ppcls/modeling/architectures/resnext.py rename to ppcls/arch/backbone/resnext.py diff --git a/ppcls/modeling/architectures/resnext101_wsl.py b/ppcls/arch/backbone/resnext101_wsl.py similarity index 100% rename from ppcls/modeling/architectures/resnext101_wsl.py rename to ppcls/arch/backbone/resnext101_wsl.py diff --git a/ppcls/modeling/architectures/resnext_vd.py b/ppcls/arch/backbone/resnext_vd.py similarity index 100% rename from ppcls/modeling/architectures/resnext_vd.py rename to ppcls/arch/backbone/resnext_vd.py diff --git a/ppcls/modeling/architectures/rexnet.py b/ppcls/arch/backbone/rexnet.py similarity index 100% rename from ppcls/modeling/architectures/rexnet.py rename to ppcls/arch/backbone/rexnet.py diff --git a/ppcls/modeling/architectures/se_resnet_vd.py b/ppcls/arch/backbone/se_resnet_vd.py similarity index 100% rename from ppcls/modeling/architectures/se_resnet_vd.py rename to ppcls/arch/backbone/se_resnet_vd.py diff --git a/ppcls/modeling/architectures/se_resnext.py b/ppcls/arch/backbone/se_resnext.py similarity index 100% rename from ppcls/modeling/architectures/se_resnext.py rename to ppcls/arch/backbone/se_resnext.py diff --git a/ppcls/modeling/architectures/se_resnext_vd.py b/ppcls/arch/backbone/se_resnext_vd.py similarity index 100% rename from ppcls/modeling/architectures/se_resnext_vd.py rename to ppcls/arch/backbone/se_resnext_vd.py diff --git a/ppcls/modeling/architectures/shufflenet_v2.py b/ppcls/arch/backbone/shufflenet_v2.py similarity index 100% rename from ppcls/modeling/architectures/shufflenet_v2.py rename to ppcls/arch/backbone/shufflenet_v2.py diff --git a/ppcls/modeling/architectures/squeezenet.py b/ppcls/arch/backbone/squeezenet.py similarity index 100% rename from ppcls/modeling/architectures/squeezenet.py rename to ppcls/arch/backbone/squeezenet.py diff --git a/ppcls/modeling/architectures/swin_transformer.py b/ppcls/arch/backbone/swin_transformer.py similarity index 100% rename from ppcls/modeling/architectures/swin_transformer.py rename to ppcls/arch/backbone/swin_transformer.py diff --git a/ppcls/modeling/architectures/vgg.py b/ppcls/arch/backbone/vgg.py similarity index 100% rename from ppcls/modeling/architectures/vgg.py rename to ppcls/arch/backbone/vgg.py diff --git a/ppcls/modeling/architectures/vision_transformer.py b/ppcls/arch/backbone/vision_transformer.py similarity index 100% rename from ppcls/modeling/architectures/vision_transformer.py rename to ppcls/arch/backbone/vision_transformer.py diff --git a/ppcls/modeling/architectures/xception.py b/ppcls/arch/backbone/xception.py similarity index 100% rename from ppcls/modeling/architectures/xception.py rename to ppcls/arch/backbone/xception.py diff --git a/ppcls/modeling/architectures/xception_deeplab.py b/ppcls/arch/backbone/xception_deeplab.py similarity index 100% rename from ppcls/modeling/architectures/xception_deeplab.py rename to ppcls/arch/backbone/xception_deeplab.py diff --git a/ppcls/arch/loss&metrics/__init__.py b/ppcls/arch/loss&metrics/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/modeling/loss.py b/ppcls/arch/loss&metrics/loss.py similarity index 100% rename from ppcls/modeling/loss.py rename to ppcls/arch/loss&metrics/loss.py diff --git a/ppcls/modeling/utils.py b/ppcls/arch/utils.py similarity index 87% rename from ppcls/modeling/utils.py rename to ppcls/arch/utils.py index 0f38754e..308475d7 100644 --- a/ppcls/modeling/utils.py +++ b/ppcls/arch/utils.py @@ -16,7 +16,7 @@ import six import types from difflib import SequenceMatcher -from . import architectures +from . import backbone def get_architectures(): @@ -24,15 +24,15 @@ def get_architectures(): get all of model architectures """ names = [] - for k, v in architectures.__dict__.items(): + for k, v in backbone.__dict__.items(): if isinstance(v, (types.FunctionType, six.class_types)): names.append(k) return names def get_blacklist_model_in_static_mode(): - from ppcls.modeling.architectures import distilled_vision_transformer - from ppcls.modeling.architectures import vision_transformer + from ppcls.arch.backbone import distilled_vision_transformer + from ppcls.arch.backbone import vision_transformer blacklist = distilled_vision_transformer.__all__ + vision_transformer.__all__ return blacklist diff --git a/configs/AlexNet/AlexNet.yaml b/ppcls/configs/AlexNet/AlexNet.yaml similarity index 100% rename from configs/AlexNet/AlexNet.yaml rename to ppcls/configs/AlexNet/AlexNet.yaml diff --git a/configs/DPN/DPN107.yaml b/ppcls/configs/DPN/DPN107.yaml similarity index 100% rename from configs/DPN/DPN107.yaml rename to ppcls/configs/DPN/DPN107.yaml diff --git a/configs/DPN/DPN131.yaml b/ppcls/configs/DPN/DPN131.yaml similarity index 100% rename from configs/DPN/DPN131.yaml rename to ppcls/configs/DPN/DPN131.yaml diff --git a/configs/DPN/DPN68.yaml b/ppcls/configs/DPN/DPN68.yaml similarity index 100% rename from configs/DPN/DPN68.yaml rename to ppcls/configs/DPN/DPN68.yaml diff --git a/configs/DPN/DPN92.yaml b/ppcls/configs/DPN/DPN92.yaml similarity index 100% rename from configs/DPN/DPN92.yaml rename to ppcls/configs/DPN/DPN92.yaml diff --git a/configs/DPN/DPN98.yaml b/ppcls/configs/DPN/DPN98.yaml similarity index 100% rename from configs/DPN/DPN98.yaml rename to ppcls/configs/DPN/DPN98.yaml diff --git a/configs/DarkNet/DarkNet53.yaml b/ppcls/configs/DarkNet/DarkNet53.yaml similarity index 100% rename from configs/DarkNet/DarkNet53.yaml rename to ppcls/configs/DarkNet/DarkNet53.yaml diff --git a/configs/DataAugment/ResNet50_AutoAugment.yaml b/ppcls/configs/DataAugment/ResNet50_AutoAugment.yaml similarity index 100% rename from configs/DataAugment/ResNet50_AutoAugment.yaml rename to ppcls/configs/DataAugment/ResNet50_AutoAugment.yaml diff --git a/configs/DataAugment/ResNet50_Baseline.yaml b/ppcls/configs/DataAugment/ResNet50_Baseline.yaml similarity index 100% rename from configs/DataAugment/ResNet50_Baseline.yaml rename to ppcls/configs/DataAugment/ResNet50_Baseline.yaml diff --git a/configs/DataAugment/ResNet50_Cutmix.yaml b/ppcls/configs/DataAugment/ResNet50_Cutmix.yaml similarity index 100% rename from configs/DataAugment/ResNet50_Cutmix.yaml rename to ppcls/configs/DataAugment/ResNet50_Cutmix.yaml diff --git a/configs/DataAugment/ResNet50_Cutout.yaml b/ppcls/configs/DataAugment/ResNet50_Cutout.yaml similarity index 100% rename from configs/DataAugment/ResNet50_Cutout.yaml rename to ppcls/configs/DataAugment/ResNet50_Cutout.yaml diff --git a/configs/DataAugment/ResNet50_GridMask.yaml b/ppcls/configs/DataAugment/ResNet50_GridMask.yaml similarity index 100% rename from configs/DataAugment/ResNet50_GridMask.yaml rename to ppcls/configs/DataAugment/ResNet50_GridMask.yaml diff --git a/configs/DataAugment/ResNet50_HideAndSeek.yaml b/ppcls/configs/DataAugment/ResNet50_HideAndSeek.yaml similarity index 100% rename from configs/DataAugment/ResNet50_HideAndSeek.yaml rename to ppcls/configs/DataAugment/ResNet50_HideAndSeek.yaml diff --git a/configs/DataAugment/ResNet50_Mixup.yaml b/ppcls/configs/DataAugment/ResNet50_Mixup.yaml similarity index 100% rename from configs/DataAugment/ResNet50_Mixup.yaml rename to ppcls/configs/DataAugment/ResNet50_Mixup.yaml diff --git a/configs/DataAugment/ResNet50_RandAugment.yaml b/ppcls/configs/DataAugment/ResNet50_RandAugment.yaml similarity index 100% rename from configs/DataAugment/ResNet50_RandAugment.yaml rename to ppcls/configs/DataAugment/ResNet50_RandAugment.yaml diff --git a/configs/DataAugment/ResNet50_RandomErasing.yaml b/ppcls/configs/DataAugment/ResNet50_RandomErasing.yaml similarity index 100% rename from configs/DataAugment/ResNet50_RandomErasing.yaml rename to ppcls/configs/DataAugment/ResNet50_RandomErasing.yaml diff --git a/configs/DeiT/DeiT_base_distilled_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_base_distilled_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_base_distilled_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_base_distilled_patch16_224.yaml diff --git a/configs/DeiT/DeiT_base_distilled_patch16_384.yaml b/ppcls/configs/DeiT/DeiT_base_distilled_patch16_384.yaml similarity index 100% rename from configs/DeiT/DeiT_base_distilled_patch16_384.yaml rename to ppcls/configs/DeiT/DeiT_base_distilled_patch16_384.yaml diff --git a/configs/DeiT/DeiT_base_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_base_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_base_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_base_patch16_224.yaml diff --git a/configs/DeiT/DeiT_base_patch16_384.yaml b/ppcls/configs/DeiT/DeiT_base_patch16_384.yaml similarity index 100% rename from configs/DeiT/DeiT_base_patch16_384.yaml rename to ppcls/configs/DeiT/DeiT_base_patch16_384.yaml diff --git a/configs/DeiT/DeiT_small_distilled_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_small_distilled_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_small_distilled_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_small_distilled_patch16_224.yaml diff --git a/configs/DeiT/DeiT_small_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_small_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_small_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_small_patch16_224.yaml diff --git a/configs/DeiT/DeiT_tiny_distilled_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_tiny_distilled_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_tiny_distilled_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_tiny_distilled_patch16_224.yaml diff --git a/configs/DeiT/DeiT_tiny_patch16_224.yaml b/ppcls/configs/DeiT/DeiT_tiny_patch16_224.yaml similarity index 100% rename from configs/DeiT/DeiT_tiny_patch16_224.yaml rename to ppcls/configs/DeiT/DeiT_tiny_patch16_224.yaml diff --git a/configs/DenseNet/DenseNet121.yaml b/ppcls/configs/DenseNet/DenseNet121.yaml similarity index 100% rename from configs/DenseNet/DenseNet121.yaml rename to ppcls/configs/DenseNet/DenseNet121.yaml diff --git a/configs/DenseNet/DenseNet161.yaml b/ppcls/configs/DenseNet/DenseNet161.yaml similarity index 100% rename from configs/DenseNet/DenseNet161.yaml rename to ppcls/configs/DenseNet/DenseNet161.yaml diff --git a/configs/DenseNet/DenseNet169.yaml b/ppcls/configs/DenseNet/DenseNet169.yaml similarity index 100% rename from configs/DenseNet/DenseNet169.yaml rename to ppcls/configs/DenseNet/DenseNet169.yaml diff --git a/configs/DenseNet/DenseNet201.yaml b/ppcls/configs/DenseNet/DenseNet201.yaml similarity index 100% rename from configs/DenseNet/DenseNet201.yaml rename to ppcls/configs/DenseNet/DenseNet201.yaml diff --git a/configs/DenseNet/DenseNet264.yaml b/ppcls/configs/DenseNet/DenseNet264.yaml similarity index 100% rename from configs/DenseNet/DenseNet264.yaml rename to ppcls/configs/DenseNet/DenseNet264.yaml diff --git a/configs/Distillation/R50_vd_distill_MV3_large_x1_0.yaml b/ppcls/configs/Distillation/R50_vd_distill_MV3_large_x1_0.yaml similarity index 100% rename from configs/Distillation/R50_vd_distill_MV3_large_x1_0.yaml rename to ppcls/configs/Distillation/R50_vd_distill_MV3_large_x1_0.yaml diff --git a/configs/Distillation/ResX101_32x16d_wsl_distill_R50_vd.yaml b/ppcls/configs/Distillation/ResX101_32x16d_wsl_distill_R50_vd.yaml similarity index 100% rename from configs/Distillation/ResX101_32x16d_wsl_distill_R50_vd.yaml rename to ppcls/configs/Distillation/ResX101_32x16d_wsl_distill_R50_vd.yaml diff --git a/configs/EfficientNet/EfficientNetB0.yaml b/ppcls/configs/EfficientNet/EfficientNetB0.yaml similarity index 100% rename from configs/EfficientNet/EfficientNetB0.yaml rename to ppcls/configs/EfficientNet/EfficientNetB0.yaml diff --git a/configs/GhostNet/GhostNet_x0_5.yaml b/ppcls/configs/GhostNet/GhostNet_x0_5.yaml similarity index 100% rename from configs/GhostNet/GhostNet_x0_5.yaml rename to ppcls/configs/GhostNet/GhostNet_x0_5.yaml diff --git a/configs/GhostNet/GhostNet_x1_0.yaml b/ppcls/configs/GhostNet/GhostNet_x1_0.yaml similarity index 100% rename from configs/GhostNet/GhostNet_x1_0.yaml rename to ppcls/configs/GhostNet/GhostNet_x1_0.yaml diff --git a/configs/GhostNet/GhostNet_x1_3.yaml b/ppcls/configs/GhostNet/GhostNet_x1_3.yaml similarity index 100% rename from configs/GhostNet/GhostNet_x1_3.yaml rename to ppcls/configs/GhostNet/GhostNet_x1_3.yaml diff --git a/configs/HRNet/HRNet_W18_C.yaml b/ppcls/configs/HRNet/HRNet_W18_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W18_C.yaml rename to ppcls/configs/HRNet/HRNet_W18_C.yaml diff --git a/configs/HRNet/HRNet_W30_C.yaml b/ppcls/configs/HRNet/HRNet_W30_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W30_C.yaml rename to ppcls/configs/HRNet/HRNet_W30_C.yaml diff --git a/configs/HRNet/HRNet_W32_C.yaml b/ppcls/configs/HRNet/HRNet_W32_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W32_C.yaml rename to ppcls/configs/HRNet/HRNet_W32_C.yaml diff --git a/configs/HRNet/HRNet_W40_C.yaml b/ppcls/configs/HRNet/HRNet_W40_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W40_C.yaml rename to ppcls/configs/HRNet/HRNet_W40_C.yaml diff --git a/configs/HRNet/HRNet_W44_C.yaml b/ppcls/configs/HRNet/HRNet_W44_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W44_C.yaml rename to ppcls/configs/HRNet/HRNet_W44_C.yaml diff --git a/configs/HRNet/HRNet_W48_C.yaml b/ppcls/configs/HRNet/HRNet_W48_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W48_C.yaml rename to ppcls/configs/HRNet/HRNet_W48_C.yaml diff --git a/configs/HRNet/HRNet_W64_C.yaml b/ppcls/configs/HRNet/HRNet_W64_C.yaml similarity index 100% rename from configs/HRNet/HRNet_W64_C.yaml rename to ppcls/configs/HRNet/HRNet_W64_C.yaml diff --git a/configs/Inception/GoogLeNet.yaml b/ppcls/configs/Inception/GoogLeNet.yaml similarity index 100% rename from configs/Inception/GoogLeNet.yaml rename to ppcls/configs/Inception/GoogLeNet.yaml diff --git a/configs/Inception/InceptionV3.yaml b/ppcls/configs/Inception/InceptionV3.yaml similarity index 100% rename from configs/Inception/InceptionV3.yaml rename to ppcls/configs/Inception/InceptionV3.yaml diff --git a/configs/Inception/InceptionV4.yaml b/ppcls/configs/Inception/InceptionV4.yaml similarity index 100% rename from configs/Inception/InceptionV4.yaml rename to ppcls/configs/Inception/InceptionV4.yaml diff --git a/configs/MixNet/MixNet_L.yaml b/ppcls/configs/MixNet/MixNet_L.yaml similarity index 100% rename from configs/MixNet/MixNet_L.yaml rename to ppcls/configs/MixNet/MixNet_L.yaml diff --git a/configs/MixNet/MixNet_M.yaml b/ppcls/configs/MixNet/MixNet_M.yaml similarity index 100% rename from configs/MixNet/MixNet_M.yaml rename to ppcls/configs/MixNet/MixNet_M.yaml diff --git a/configs/MixNet/MixNet_S.yaml b/ppcls/configs/MixNet/MixNet_S.yaml similarity index 100% rename from configs/MixNet/MixNet_S.yaml rename to ppcls/configs/MixNet/MixNet_S.yaml diff --git a/configs/MobileNetV1/MobileNetV1.yaml b/ppcls/configs/MobileNetV1/MobileNetV1.yaml similarity index 100% rename from configs/MobileNetV1/MobileNetV1.yaml rename to ppcls/configs/MobileNetV1/MobileNetV1.yaml diff --git a/configs/MobileNetV1/MobileNetV1_x0_25.yaml b/ppcls/configs/MobileNetV1/MobileNetV1_x0_25.yaml similarity index 100% rename from configs/MobileNetV1/MobileNetV1_x0_25.yaml rename to ppcls/configs/MobileNetV1/MobileNetV1_x0_25.yaml diff --git a/configs/MobileNetV1/MobileNetV1_x0_5.yaml b/ppcls/configs/MobileNetV1/MobileNetV1_x0_5.yaml similarity index 100% rename from configs/MobileNetV1/MobileNetV1_x0_5.yaml rename to ppcls/configs/MobileNetV1/MobileNetV1_x0_5.yaml diff --git a/configs/MobileNetV1/MobileNetV1_x0_75.yaml b/ppcls/configs/MobileNetV1/MobileNetV1_x0_75.yaml similarity index 100% rename from configs/MobileNetV1/MobileNetV1_x0_75.yaml rename to ppcls/configs/MobileNetV1/MobileNetV1_x0_75.yaml diff --git a/configs/MobileNetV2/MobileNetV2.yaml b/ppcls/configs/MobileNetV2/MobileNetV2.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2.yaml diff --git a/configs/MobileNetV2/MobileNetV2_x0_25.yaml b/ppcls/configs/MobileNetV2/MobileNetV2_x0_25.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2_x0_25.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2_x0_25.yaml diff --git a/configs/MobileNetV2/MobileNetV2_x0_5.yaml b/ppcls/configs/MobileNetV2/MobileNetV2_x0_5.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2_x0_5.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2_x0_5.yaml diff --git a/configs/MobileNetV2/MobileNetV2_x0_75.yaml b/ppcls/configs/MobileNetV2/MobileNetV2_x0_75.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2_x0_75.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2_x0_75.yaml diff --git a/configs/MobileNetV2/MobileNetV2_x1_5.yaml b/ppcls/configs/MobileNetV2/MobileNetV2_x1_5.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2_x1_5.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2_x1_5.yaml diff --git a/configs/MobileNetV2/MobileNetV2_x2_0.yaml b/ppcls/configs/MobileNetV2/MobileNetV2_x2_0.yaml similarity index 100% rename from configs/MobileNetV2/MobileNetV2_x2_0.yaml rename to ppcls/configs/MobileNetV2/MobileNetV2_x2_0.yaml diff --git a/configs/MobileNetV3/MobileNetV3_large_x0_35.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_large_x0_35.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_large_x0_35.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_large_x0_35.yaml diff --git a/configs/MobileNetV3/MobileNetV3_large_x0_5.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_large_x0_5.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_large_x0_5.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_large_x0_5.yaml diff --git a/configs/MobileNetV3/MobileNetV3_large_x0_75.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_large_x0_75.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_large_x0_75.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_large_x0_75.yaml diff --git a/configs/MobileNetV3/MobileNetV3_large_x1_0.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_large_x1_0.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_large_x1_0.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_large_x1_0.yaml diff --git a/configs/MobileNetV3/MobileNetV3_large_x1_25.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_large_x1_25.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_large_x1_25.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_large_x1_25.yaml diff --git a/configs/MobileNetV3/MobileNetV3_small_x0_35.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_small_x0_35.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_small_x0_35.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_small_x0_35.yaml diff --git a/configs/MobileNetV3/MobileNetV3_small_x0_5.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_small_x0_5.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_small_x0_5.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_small_x0_5.yaml diff --git a/configs/MobileNetV3/MobileNetV3_small_x0_75.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_small_x0_75.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_small_x0_75.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_small_x0_75.yaml diff --git a/configs/MobileNetV3/MobileNetV3_small_x1_0.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_small_x1_0.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_small_x1_0.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_small_x1_0.yaml diff --git a/configs/MobileNetV3/MobileNetV3_small_x1_25.yaml b/ppcls/configs/MobileNetV3/MobileNetV3_small_x1_25.yaml similarity index 100% rename from configs/MobileNetV3/MobileNetV3_small_x1_25.yaml rename to ppcls/configs/MobileNetV3/MobileNetV3_small_x1_25.yaml diff --git a/configs/ReXNet/ReXNet_1_0.yaml b/ppcls/configs/ReXNet/ReXNet_1_0.yaml similarity index 100% rename from configs/ReXNet/ReXNet_1_0.yaml rename to ppcls/configs/ReXNet/ReXNet_1_0.yaml diff --git a/configs/ReXNet/ReXNet_1_3.yaml b/ppcls/configs/ReXNet/ReXNet_1_3.yaml similarity index 100% rename from configs/ReXNet/ReXNet_1_3.yaml rename to ppcls/configs/ReXNet/ReXNet_1_3.yaml diff --git a/configs/ReXNet/ReXNet_1_5.yaml b/ppcls/configs/ReXNet/ReXNet_1_5.yaml similarity index 100% rename from configs/ReXNet/ReXNet_1_5.yaml rename to ppcls/configs/ReXNet/ReXNet_1_5.yaml diff --git a/configs/ReXNet/ReXNet_2_0.yaml b/ppcls/configs/ReXNet/ReXNet_2_0.yaml similarity index 100% rename from configs/ReXNet/ReXNet_2_0.yaml rename to ppcls/configs/ReXNet/ReXNet_2_0.yaml diff --git a/configs/ReXNet/ReXNet_3_0.yaml b/ppcls/configs/ReXNet/ReXNet_3_0.yaml similarity index 100% rename from configs/ReXNet/ReXNet_3_0.yaml rename to ppcls/configs/ReXNet/ReXNet_3_0.yaml diff --git a/configs/RegNet/RegNetX_4GF.yaml b/ppcls/configs/RegNet/RegNetX_4GF.yaml similarity index 100% rename from configs/RegNet/RegNetX_4GF.yaml rename to ppcls/configs/RegNet/RegNetX_4GF.yaml diff --git a/configs/RepVGG/RepVGG_A0.yaml b/ppcls/configs/RepVGG/RepVGG_A0.yaml similarity index 100% rename from configs/RepVGG/RepVGG_A0.yaml rename to ppcls/configs/RepVGG/RepVGG_A0.yaml diff --git a/configs/RepVGG/RepVGG_A1.yaml b/ppcls/configs/RepVGG/RepVGG_A1.yaml similarity index 100% rename from configs/RepVGG/RepVGG_A1.yaml rename to ppcls/configs/RepVGG/RepVGG_A1.yaml diff --git a/configs/RepVGG/RepVGG_A2.yaml b/ppcls/configs/RepVGG/RepVGG_A2.yaml similarity index 100% rename from configs/RepVGG/RepVGG_A2.yaml rename to ppcls/configs/RepVGG/RepVGG_A2.yaml diff --git a/configs/RepVGG/RepVGG_B0.yaml b/ppcls/configs/RepVGG/RepVGG_B0.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B0.yaml rename to ppcls/configs/RepVGG/RepVGG_B0.yaml diff --git a/configs/RepVGG/RepVGG_B1.yaml b/ppcls/configs/RepVGG/RepVGG_B1.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B1.yaml rename to ppcls/configs/RepVGG/RepVGG_B1.yaml diff --git a/configs/RepVGG/RepVGG_B1g2.yaml b/ppcls/configs/RepVGG/RepVGG_B1g2.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B1g2.yaml rename to ppcls/configs/RepVGG/RepVGG_B1g2.yaml diff --git a/configs/RepVGG/RepVGG_B1g4.yaml b/ppcls/configs/RepVGG/RepVGG_B1g4.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B1g4.yaml rename to ppcls/configs/RepVGG/RepVGG_B1g4.yaml diff --git a/configs/RepVGG/RepVGG_B2.yaml b/ppcls/configs/RepVGG/RepVGG_B2.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B2.yaml rename to ppcls/configs/RepVGG/RepVGG_B2.yaml diff --git a/configs/RepVGG/RepVGG_B2g2.yaml b/ppcls/configs/RepVGG/RepVGG_B2g2.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B2g2.yaml rename to ppcls/configs/RepVGG/RepVGG_B2g2.yaml diff --git a/configs/RepVGG/RepVGG_B2g4.yaml b/ppcls/configs/RepVGG/RepVGG_B2g4.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B2g4.yaml rename to ppcls/configs/RepVGG/RepVGG_B2g4.yaml diff --git a/configs/RepVGG/RepVGG_B3.yaml b/ppcls/configs/RepVGG/RepVGG_B3.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B3.yaml rename to ppcls/configs/RepVGG/RepVGG_B3.yaml diff --git a/configs/RepVGG/RepVGG_B3g2.yaml b/ppcls/configs/RepVGG/RepVGG_B3g2.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B3g2.yaml rename to ppcls/configs/RepVGG/RepVGG_B3g2.yaml diff --git a/configs/RepVGG/RepVGG_B3g4.yaml b/ppcls/configs/RepVGG/RepVGG_B3g4.yaml similarity index 100% rename from configs/RepVGG/RepVGG_B3g4.yaml rename to ppcls/configs/RepVGG/RepVGG_B3g4.yaml diff --git a/configs/Res2Net/Res2Net101_vd_26w_4s.yaml b/ppcls/configs/Res2Net/Res2Net101_vd_26w_4s.yaml similarity index 100% rename from configs/Res2Net/Res2Net101_vd_26w_4s.yaml rename to ppcls/configs/Res2Net/Res2Net101_vd_26w_4s.yaml diff --git a/configs/Res2Net/Res2Net200_vd_26w_4s.yaml b/ppcls/configs/Res2Net/Res2Net200_vd_26w_4s.yaml similarity index 100% rename from configs/Res2Net/Res2Net200_vd_26w_4s.yaml rename to ppcls/configs/Res2Net/Res2Net200_vd_26w_4s.yaml diff --git a/configs/Res2Net/Res2Net50_14w_8s.yaml b/ppcls/configs/Res2Net/Res2Net50_14w_8s.yaml similarity index 100% rename from configs/Res2Net/Res2Net50_14w_8s.yaml rename to ppcls/configs/Res2Net/Res2Net50_14w_8s.yaml diff --git a/configs/Res2Net/Res2Net50_26w_4s.yaml b/ppcls/configs/Res2Net/Res2Net50_26w_4s.yaml similarity index 100% rename from configs/Res2Net/Res2Net50_26w_4s.yaml rename to ppcls/configs/Res2Net/Res2Net50_26w_4s.yaml diff --git a/configs/Res2Net/Res2Net50_vd_26w_4s.yaml b/ppcls/configs/Res2Net/Res2Net50_vd_26w_4s.yaml similarity index 100% rename from configs/Res2Net/Res2Net50_vd_26w_4s.yaml rename to ppcls/configs/Res2Net/Res2Net50_vd_26w_4s.yaml diff --git a/configs/ResNeSt/ResNeSt101.yaml b/ppcls/configs/ResNeSt/ResNeSt101.yaml similarity index 100% rename from configs/ResNeSt/ResNeSt101.yaml rename to ppcls/configs/ResNeSt/ResNeSt101.yaml diff --git a/configs/ResNeSt/ResNeSt50.yaml b/ppcls/configs/ResNeSt/ResNeSt50.yaml similarity index 100% rename from configs/ResNeSt/ResNeSt50.yaml rename to ppcls/configs/ResNeSt/ResNeSt50.yaml diff --git a/configs/ResNeSt/ResNeSt50_fast_1s1x64d.yaml b/ppcls/configs/ResNeSt/ResNeSt50_fast_1s1x64d.yaml similarity index 100% rename from configs/ResNeSt/ResNeSt50_fast_1s1x64d.yaml rename to ppcls/configs/ResNeSt/ResNeSt50_fast_1s1x64d.yaml diff --git a/configs/ResNeXt/ResNeXt101_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt101_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt101_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt101_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt101_32x4d_fp16.yaml b/ppcls/configs/ResNeXt/ResNeXt101_32x4d_fp16.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt101_32x4d_fp16.yaml rename to ppcls/configs/ResNeXt/ResNeXt101_32x4d_fp16.yaml diff --git a/configs/ResNeXt/ResNeXt101_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt101_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt101_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt101_64x4d.yaml diff --git a/configs/ResNeXt/ResNeXt101_vd_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt101_vd_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt101_vd_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt101_vd_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt101_vd_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt101_vd_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt101_vd_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt101_vd_64x4d.yaml diff --git a/configs/ResNeXt/ResNeXt152_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt152_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt152_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt152_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt152_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt152_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt152_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt152_64x4d.yaml diff --git a/configs/ResNeXt/ResNeXt152_vd_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt152_vd_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt152_vd_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt152_vd_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt152_vd_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt152_vd_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt152_vd_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt152_vd_64x4d.yaml diff --git a/configs/ResNeXt/ResNeXt50_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt50_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt50_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt50_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt50_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt50_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt50_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt50_64x4d.yaml diff --git a/configs/ResNeXt/ResNeXt50_vd_32x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt50_vd_32x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt50_vd_32x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt50_vd_32x4d.yaml diff --git a/configs/ResNeXt/ResNeXt50_vd_64x4d.yaml b/ppcls/configs/ResNeXt/ResNeXt50_vd_64x4d.yaml similarity index 100% rename from configs/ResNeXt/ResNeXt50_vd_64x4d.yaml rename to ppcls/configs/ResNeXt/ResNeXt50_vd_64x4d.yaml diff --git a/configs/ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml b/ppcls/configs/ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml similarity index 100% rename from configs/ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml rename to ppcls/configs/ResNeXt101_wsl/ResNeXt101_32x8d_wsl.yaml diff --git a/configs/ResNet/ResNet101.yaml b/ppcls/configs/ResNet/ResNet101.yaml similarity index 100% rename from configs/ResNet/ResNet101.yaml rename to ppcls/configs/ResNet/ResNet101.yaml diff --git a/configs/ResNet/ResNet101_vd.yaml b/ppcls/configs/ResNet/ResNet101_vd.yaml similarity index 100% rename from configs/ResNet/ResNet101_vd.yaml rename to ppcls/configs/ResNet/ResNet101_vd.yaml diff --git a/configs/ResNet/ResNet152.yaml b/ppcls/configs/ResNet/ResNet152.yaml similarity index 100% rename from configs/ResNet/ResNet152.yaml rename to ppcls/configs/ResNet/ResNet152.yaml diff --git a/configs/ResNet/ResNet152_vd.yaml b/ppcls/configs/ResNet/ResNet152_vd.yaml similarity index 100% rename from configs/ResNet/ResNet152_vd.yaml rename to ppcls/configs/ResNet/ResNet152_vd.yaml diff --git a/configs/ResNet/ResNet18.yaml b/ppcls/configs/ResNet/ResNet18.yaml similarity index 100% rename from configs/ResNet/ResNet18.yaml rename to ppcls/configs/ResNet/ResNet18.yaml diff --git a/configs/ResNet/ResNet18_vd.yaml b/ppcls/configs/ResNet/ResNet18_vd.yaml similarity index 100% rename from configs/ResNet/ResNet18_vd.yaml rename to ppcls/configs/ResNet/ResNet18_vd.yaml diff --git a/configs/ResNet/ResNet200_vd.yaml b/ppcls/configs/ResNet/ResNet200_vd.yaml similarity index 100% rename from configs/ResNet/ResNet200_vd.yaml rename to ppcls/configs/ResNet/ResNet200_vd.yaml diff --git a/configs/ResNet/ResNet34.yaml b/ppcls/configs/ResNet/ResNet34.yaml similarity index 100% rename from configs/ResNet/ResNet34.yaml rename to ppcls/configs/ResNet/ResNet34.yaml diff --git a/configs/ResNet/ResNet34_vd.yaml b/ppcls/configs/ResNet/ResNet34_vd.yaml similarity index 100% rename from configs/ResNet/ResNet34_vd.yaml rename to ppcls/configs/ResNet/ResNet34_vd.yaml diff --git a/configs/ResNet/ResNet50.yaml b/ppcls/configs/ResNet/ResNet50.yaml similarity index 100% rename from configs/ResNet/ResNet50.yaml rename to ppcls/configs/ResNet/ResNet50.yaml diff --git a/configs/ResNet/ResNet50_fp16.yaml b/ppcls/configs/ResNet/ResNet50_fp16.yaml similarity index 100% rename from configs/ResNet/ResNet50_fp16.yaml rename to ppcls/configs/ResNet/ResNet50_fp16.yaml diff --git a/configs/ResNet/ResNet50_vc.yaml b/ppcls/configs/ResNet/ResNet50_vc.yaml similarity index 100% rename from configs/ResNet/ResNet50_vc.yaml rename to ppcls/configs/ResNet/ResNet50_vc.yaml diff --git a/configs/ResNet/ResNet50_vd.yaml b/ppcls/configs/ResNet/ResNet50_vd.yaml similarity index 100% rename from configs/ResNet/ResNet50_vd.yaml rename to ppcls/configs/ResNet/ResNet50_vd.yaml diff --git a/configs/SENet/SENet154_vd.yaml b/ppcls/configs/SENet/SENet154_vd.yaml similarity index 100% rename from configs/SENet/SENet154_vd.yaml rename to ppcls/configs/SENet/SENet154_vd.yaml diff --git a/configs/SENet/SE_ResNeXt101_32x4d.yaml b/ppcls/configs/SENet/SE_ResNeXt101_32x4d.yaml similarity index 100% rename from configs/SENet/SE_ResNeXt101_32x4d.yaml rename to ppcls/configs/SENet/SE_ResNeXt101_32x4d.yaml diff --git a/configs/SENet/SE_ResNeXt101_32x4d_fp16.yaml b/ppcls/configs/SENet/SE_ResNeXt101_32x4d_fp16.yaml similarity index 100% rename from configs/SENet/SE_ResNeXt101_32x4d_fp16.yaml rename to ppcls/configs/SENet/SE_ResNeXt101_32x4d_fp16.yaml diff --git a/configs/SENet/SE_ResNeXt50_32x4d.yaml b/ppcls/configs/SENet/SE_ResNeXt50_32x4d.yaml similarity index 100% rename from configs/SENet/SE_ResNeXt50_32x4d.yaml rename to ppcls/configs/SENet/SE_ResNeXt50_32x4d.yaml diff --git a/configs/SENet/SE_ResNeXt50_vd_32x4d.yaml b/ppcls/configs/SENet/SE_ResNeXt50_vd_32x4d.yaml similarity index 100% rename from configs/SENet/SE_ResNeXt50_vd_32x4d.yaml rename to ppcls/configs/SENet/SE_ResNeXt50_vd_32x4d.yaml diff --git a/configs/SENet/SE_ResNet18_vd.yaml b/ppcls/configs/SENet/SE_ResNet18_vd.yaml similarity index 100% rename from configs/SENet/SE_ResNet18_vd.yaml rename to ppcls/configs/SENet/SE_ResNet18_vd.yaml diff --git a/configs/SENet/SE_ResNet34_vd.yaml b/ppcls/configs/SENet/SE_ResNet34_vd.yaml similarity index 100% rename from configs/SENet/SE_ResNet34_vd.yaml rename to ppcls/configs/SENet/SE_ResNet34_vd.yaml diff --git a/configs/SENet/SE_ResNet50_vd.yaml b/ppcls/configs/SENet/SE_ResNet50_vd.yaml similarity index 100% rename from configs/SENet/SE_ResNet50_vd.yaml rename to ppcls/configs/SENet/SE_ResNet50_vd.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_swish.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_swish.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_swish.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_swish.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x0_25.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x0_25.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x0_25.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x0_25.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x0_33.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x0_33.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x0_33.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x0_33.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x0_5.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x0_5.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x0_5.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x0_5.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x1_0.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x1_0.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x1_0.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x1_0.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x1_5.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x1_5.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x1_5.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x1_5.yaml diff --git a/configs/ShuffleNet/ShuffleNetV2_x2_0.yaml b/ppcls/configs/ShuffleNet/ShuffleNetV2_x2_0.yaml similarity index 100% rename from configs/ShuffleNet/ShuffleNetV2_x2_0.yaml rename to ppcls/configs/ShuffleNet/ShuffleNetV2_x2_0.yaml diff --git a/configs/SqueezeNet/SqueezeNet1_0.yaml b/ppcls/configs/SqueezeNet/SqueezeNet1_0.yaml similarity index 100% rename from configs/SqueezeNet/SqueezeNet1_0.yaml rename to ppcls/configs/SqueezeNet/SqueezeNet1_0.yaml diff --git a/configs/SqueezeNet/SqueezeNet1_1.yaml b/ppcls/configs/SqueezeNet/SqueezeNet1_1.yaml similarity index 100% rename from configs/SqueezeNet/SqueezeNet1_1.yaml rename to ppcls/configs/SqueezeNet/SqueezeNet1_1.yaml diff --git a/configs/SwinTransformer/SwinTransformer_base_patch4_window12_384.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_base_patch4_window12_384.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_base_patch4_window12_384.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_base_patch4_window12_384.yaml diff --git a/configs/SwinTransformer/SwinTransformer_base_patch4_window7_224.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_base_patch4_window7_224.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_base_patch4_window7_224.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_base_patch4_window7_224.yaml diff --git a/configs/SwinTransformer/SwinTransformer_large_patch4_window12_384.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_large_patch4_window12_384.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_large_patch4_window12_384.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_large_patch4_window12_384.yaml diff --git a/configs/SwinTransformer/SwinTransformer_large_patch4_window7_224.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_large_patch4_window7_224.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_large_patch4_window7_224.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_large_patch4_window7_224.yaml diff --git a/configs/SwinTransformer/SwinTransformer_small_patch4_window7_224.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_small_patch4_window7_224.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_small_patch4_window7_224.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_small_patch4_window7_224.yaml diff --git a/configs/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml b/ppcls/configs/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml similarity index 100% rename from configs/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml rename to ppcls/configs/SwinTransformer/SwinTransformer_tiny_patch4_window7_224.yaml diff --git a/configs/VGG/VGG11.yaml b/ppcls/configs/VGG/VGG11.yaml similarity index 100% rename from configs/VGG/VGG11.yaml rename to ppcls/configs/VGG/VGG11.yaml diff --git a/configs/VGG/VGG13.yaml b/ppcls/configs/VGG/VGG13.yaml similarity index 100% rename from configs/VGG/VGG13.yaml rename to ppcls/configs/VGG/VGG13.yaml diff --git a/configs/VGG/VGG16.yaml b/ppcls/configs/VGG/VGG16.yaml similarity index 100% rename from configs/VGG/VGG16.yaml rename to ppcls/configs/VGG/VGG16.yaml diff --git a/configs/VGG/VGG19.yaml b/ppcls/configs/VGG/VGG19.yaml similarity index 100% rename from configs/VGG/VGG19.yaml rename to ppcls/configs/VGG/VGG19.yaml diff --git a/configs/VisionTransformer/ViT_base_patch16_224.yaml b/ppcls/configs/VisionTransformer/ViT_base_patch16_224.yaml similarity index 100% rename from configs/VisionTransformer/ViT_base_patch16_224.yaml rename to ppcls/configs/VisionTransformer/ViT_base_patch16_224.yaml diff --git a/configs/VisionTransformer/ViT_base_patch16_384.yaml b/ppcls/configs/VisionTransformer/ViT_base_patch16_384.yaml similarity index 100% rename from configs/VisionTransformer/ViT_base_patch16_384.yaml rename to ppcls/configs/VisionTransformer/ViT_base_patch16_384.yaml diff --git a/configs/VisionTransformer/ViT_base_patch32_384.yaml b/ppcls/configs/VisionTransformer/ViT_base_patch32_384.yaml similarity index 100% rename from configs/VisionTransformer/ViT_base_patch32_384.yaml rename to ppcls/configs/VisionTransformer/ViT_base_patch32_384.yaml diff --git a/configs/VisionTransformer/ViT_huge_patch16_224.yaml b/ppcls/configs/VisionTransformer/ViT_huge_patch16_224.yaml similarity index 100% rename from configs/VisionTransformer/ViT_huge_patch16_224.yaml rename to ppcls/configs/VisionTransformer/ViT_huge_patch16_224.yaml diff --git a/configs/VisionTransformer/ViT_huge_patch32_384.yaml b/ppcls/configs/VisionTransformer/ViT_huge_patch32_384.yaml similarity index 100% rename from configs/VisionTransformer/ViT_huge_patch32_384.yaml rename to ppcls/configs/VisionTransformer/ViT_huge_patch32_384.yaml diff --git a/configs/VisionTransformer/ViT_large_patch16_224.yaml b/ppcls/configs/VisionTransformer/ViT_large_patch16_224.yaml similarity index 100% rename from configs/VisionTransformer/ViT_large_patch16_224.yaml rename to ppcls/configs/VisionTransformer/ViT_large_patch16_224.yaml diff --git a/configs/VisionTransformer/ViT_large_patch16_384.yaml b/ppcls/configs/VisionTransformer/ViT_large_patch16_384.yaml similarity index 100% rename from configs/VisionTransformer/ViT_large_patch16_384.yaml rename to ppcls/configs/VisionTransformer/ViT_large_patch16_384.yaml diff --git a/configs/VisionTransformer/ViT_large_patch32_384.yaml b/ppcls/configs/VisionTransformer/ViT_large_patch32_384.yaml similarity index 100% rename from configs/VisionTransformer/ViT_large_patch32_384.yaml rename to ppcls/configs/VisionTransformer/ViT_large_patch32_384.yaml diff --git a/configs/VisionTransformer/ViT_small_patch16_224.yaml b/ppcls/configs/VisionTransformer/ViT_small_patch16_224.yaml similarity index 100% rename from configs/VisionTransformer/ViT_small_patch16_224.yaml rename to ppcls/configs/VisionTransformer/ViT_small_patch16_224.yaml diff --git a/configs/Xception/Xception41.yaml b/ppcls/configs/Xception/Xception41.yaml similarity index 100% rename from configs/Xception/Xception41.yaml rename to ppcls/configs/Xception/Xception41.yaml diff --git a/configs/Xception/Xception41_deeplab.yaml b/ppcls/configs/Xception/Xception41_deeplab.yaml similarity index 100% rename from configs/Xception/Xception41_deeplab.yaml rename to ppcls/configs/Xception/Xception41_deeplab.yaml diff --git a/configs/Xception/Xception65.yaml b/ppcls/configs/Xception/Xception65.yaml similarity index 100% rename from configs/Xception/Xception65.yaml rename to ppcls/configs/Xception/Xception65.yaml diff --git a/configs/Xception/Xception65_deeplab.yaml b/ppcls/configs/Xception/Xception65_deeplab.yaml similarity index 100% rename from configs/Xception/Xception65_deeplab.yaml rename to ppcls/configs/Xception/Xception65_deeplab.yaml diff --git a/configs/Xception/Xception71.yaml b/ppcls/configs/Xception/Xception71.yaml similarity index 100% rename from configs/Xception/Xception71.yaml rename to ppcls/configs/Xception/Xception71.yaml diff --git a/configs/eval.yaml b/ppcls/configs/eval.yaml similarity index 100% rename from configs/eval.yaml rename to ppcls/configs/eval.yaml diff --git a/configs/quick_start/HRNet_W18_C_finetune_kunlun.yaml b/ppcls/configs/quick_start/HRNet_W18_C_finetune_kunlun.yaml similarity index 100% rename from configs/quick_start/HRNet_W18_C_finetune_kunlun.yaml rename to ppcls/configs/quick_start/HRNet_W18_C_finetune_kunlun.yaml diff --git a/configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml b/ppcls/configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml similarity index 100% rename from configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml rename to ppcls/configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml diff --git a/configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml b/ppcls/configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml similarity index 100% rename from configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml rename to ppcls/configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml diff --git a/configs/quick_start/ResNet50_vd.yaml b/ppcls/configs/quick_start/ResNet50_vd.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd.yaml rename to ppcls/configs/quick_start/ResNet50_vd.yaml diff --git a/configs/quick_start/ResNet50_vd_finetune.yaml b/ppcls/configs/quick_start/ResNet50_vd_finetune.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd_finetune.yaml rename to ppcls/configs/quick_start/ResNet50_vd_finetune.yaml diff --git a/configs/quick_start/ResNet50_vd_finetune_kunlun.yaml b/ppcls/configs/quick_start/ResNet50_vd_finetune_kunlun.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd_finetune_kunlun.yaml rename to ppcls/configs/quick_start/ResNet50_vd_finetune_kunlun.yaml diff --git a/configs/quick_start/ResNet50_vd_multilabel.yaml b/ppcls/configs/quick_start/ResNet50_vd_multilabel.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd_multilabel.yaml rename to ppcls/configs/quick_start/ResNet50_vd_multilabel.yaml diff --git a/configs/quick_start/ResNet50_vd_ssld_finetune.yaml b/ppcls/configs/quick_start/ResNet50_vd_ssld_finetune.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd_ssld_finetune.yaml rename to ppcls/configs/quick_start/ResNet50_vd_ssld_finetune.yaml diff --git a/configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml b/ppcls/configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml similarity index 100% rename from configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml rename to ppcls/configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml diff --git a/configs/quick_start/VGG16_finetune_kunlun.yaml b/ppcls/configs/quick_start/VGG16_finetune_kunlun.yaml similarity index 100% rename from configs/quick_start/VGG16_finetune_kunlun.yaml rename to ppcls/configs/quick_start/VGG16_finetune_kunlun.yaml diff --git a/configs/quick_start/VGG19_finetune_kunlun.yaml b/ppcls/configs/quick_start/VGG19_finetune_kunlun.yaml similarity index 100% rename from configs/quick_start/VGG19_finetune_kunlun.yaml rename to ppcls/configs/quick_start/VGG19_finetune_kunlun.yaml diff --git a/configs/quick_start/new_user/ShuffleNetV2_x0_25.yaml b/ppcls/configs/quick_start/new_user/ShuffleNetV2_x0_25.yaml similarity index 100% rename from configs/quick_start/new_user/ShuffleNetV2_x0_25.yaml rename to ppcls/configs/quick_start/new_user/ShuffleNetV2_x0_25.yaml diff --git a/configs/quick_start/professional/MobileNetV3_large_x1_0_CIFAR100_finetune.yaml b/ppcls/configs/quick_start/professional/MobileNetV3_large_x1_0_CIFAR100_finetune.yaml similarity index 100% rename from configs/quick_start/professional/MobileNetV3_large_x1_0_CIFAR100_finetune.yaml rename to ppcls/configs/quick_start/professional/MobileNetV3_large_x1_0_CIFAR100_finetune.yaml diff --git a/configs/quick_start/professional/R50_vd_distill_MV3_large_x1_0_CIFAR100.yaml b/ppcls/configs/quick_start/professional/R50_vd_distill_MV3_large_x1_0_CIFAR100.yaml similarity index 100% rename from configs/quick_start/professional/R50_vd_distill_MV3_large_x1_0_CIFAR100.yaml rename to ppcls/configs/quick_start/professional/R50_vd_distill_MV3_large_x1_0_CIFAR100.yaml diff --git a/configs/quick_start/professional/ResNet50_vd_CIFAR100.yaml b/ppcls/configs/quick_start/professional/ResNet50_vd_CIFAR100.yaml similarity index 100% rename from configs/quick_start/professional/ResNet50_vd_CIFAR100.yaml rename to ppcls/configs/quick_start/professional/ResNet50_vd_CIFAR100.yaml diff --git a/configs/quick_start/professional/ResNet50_vd_CIFAR100_finetune.yaml b/ppcls/configs/quick_start/professional/ResNet50_vd_CIFAR100_finetune.yaml similarity index 100% rename from configs/quick_start/professional/ResNet50_vd_CIFAR100_finetune.yaml rename to ppcls/configs/quick_start/professional/ResNet50_vd_CIFAR100_finetune.yaml diff --git a/configs/quick_start/professional/ResNet50_vd_mixup_CIFAR100_finetune.yaml b/ppcls/configs/quick_start/professional/ResNet50_vd_mixup_CIFAR100_finetune.yaml similarity index 100% rename from configs/quick_start/professional/ResNet50_vd_mixup_CIFAR100_finetune.yaml rename to ppcls/configs/quick_start/professional/ResNet50_vd_mixup_CIFAR100_finetune.yaml diff --git a/configs/quick_start/professional/ResNet50_vd_ssld_CIFAR100_finetune.yaml b/ppcls/configs/quick_start/professional/ResNet50_vd_ssld_CIFAR100_finetune.yaml similarity index 100% rename from configs/quick_start/professional/ResNet50_vd_ssld_CIFAR100_finetune.yaml rename to ppcls/configs/quick_start/professional/ResNet50_vd_ssld_CIFAR100_finetune.yaml diff --git a/ppcls/data/dataset/__init__.py b/ppcls/data/dataset/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/data/dataset/flowers102/__init__.py b/ppcls/data/dataset/flowers102/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/data/dataset/flowers102/generate_flowers102_list.py b/ppcls/data/dataset/flowers102/generate_flowers102_list.py new file mode 100644 index 00000000..0867a316 --- /dev/null +++ b/ppcls/data/dataset/flowers102/generate_flowers102_list.py @@ -0,0 +1,38 @@ +""" +.mat files data format +imagelabel.mat +jpg_name 1 2 3 ... +label 32 12 66 ... + +setid.mat +jpg_name(10 records in a class) 24 6 100 65 32 ... +label 4 ... +""" +""" +Usage: + python generate_flower_list.py prefix_folder mode + python generate_flower_list.py jpg train > train_list.txt + python generate_flower_list.py jpg valid > val_list.txt +""" + +import scipy.io +import numpy as np +import os +import sys + +data_path = sys.argv[1] +imagelabels_path = './imagelabels.mat' +setid_path = './setid.mat' + +labels = scipy.io.loadmat(imagelabels_path) +labels = np.array(labels['labels'][0]) +setid = scipy.io.loadmat(setid_path) + +d = {} +d['train'] = np.array(setid['trnid'][0]) +d['valid'] = np.array(setid['valid'][0]) +d['test'] = np.array(setid['tstid'][0]) + +for id in d[sys.argv[2]]: + message = str(data_path) + "/image_" + str(id).zfill(5) + ".jpg " + str(labels[id - 1] - 1) + print(message) diff --git a/ppcls/engine/__init__.py b/ppcls/engine/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/promote/__init__.py b/ppcls/promote/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ppcls/utils/check.py b/ppcls/utils/check.py index 12462332..bc703081 100644 --- a/ppcls/utils/check.py +++ b/ppcls/utils/check.py @@ -22,9 +22,9 @@ import sys import paddle from paddle import is_compiled_with_cuda -from ppcls.modeling import get_architectures -from ppcls.modeling import similar_architectures -from ppcls.modeling import get_blacklist_model_in_static_mode +from ppcls.arch import get_architectures +from ppcls.arch import similar_architectures +from ppcls.arch import get_blacklist_model_in_static_mode from ppcls.utils import logger diff --git a/ppcls/utils/model_zoo.py b/ppcls/utils/model_zoo.py index d837aff2..fc527f6a 100644 --- a/ppcls/utils/model_zoo.py +++ b/ppcls/utils/model_zoo.py @@ -23,7 +23,7 @@ import tarfile import tqdm import zipfile -from ppcls.modeling import similar_architectures +from ppcls.arch import similar_architectures from ppcls.utils import logger __all__ = ['get'] -- GitLab