Skip to content

Release1.0.1 #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 68 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2f7612a
add swin transformer
firestonelib Oct 26, 2021
b5c2286
add swin transformer
firestonelib Oct 26, 2021
ba20e04
add swin transformer
firestonelib Oct 26, 2021
382f820
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 3, 2021
5805bc3
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 10, 2021
225f6f4
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 13, 2021
9e90431
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 15, 2021
efee9a2
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 18, 2021
0e88cee
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 23, 2021
db6353f
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 24, 2021
f802aa7
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 24, 2021
5b57327
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 25, 2021
f7aa5e6
Merge branch 'PaddlePaddle:main' into main
firestonelib Nov 30, 2021
30f7baf
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 17, 2021
23559e3
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 21, 2021
866e205
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 21, 2021
d068f93
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 22, 2021
0c1ed78
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 23, 2021
70f6a84
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 26, 2021
631c53f
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 27, 2021
f08475c
Merge branch 'PaddlePaddle:main' into main
firestonelib Dec 30, 2021
c1efd75
Merge branch 'PaddlePaddle:main' into main
firestonelib Jan 19, 2022
70ddc2c
Merge branch 'PaddlePaddle:main' into main
firestonelib Jan 23, 2022
ef70684
Merge branch 'PaddlePaddle:main' into main
firestonelib Jan 23, 2022
7808eb7
Merge branch 'PaddlePaddle:main' into main
firestonelib Jan 26, 2022
2456a60
Merge branch 'PaddlePaddle:main' into main
firestonelib Jan 27, 2022
b4a1e48
Merge branch 'PaddlePaddle:main' into main
firestonelib Feb 17, 2022
c4ff260
Merge branch 'PaddlePaddle:main' into main
firestonelib Feb 18, 2022
a4b71e8
Merge branch 'PaddlePaddle:main' into main
firestonelib Feb 24, 2022
603a8d2
add beit
firestonelib Feb 24, 2022
702a8f2
add device
firestonelib Feb 24, 2022
cd2983d
add beit
firestonelib Feb 24, 2022
a1ba68e
add beit
firestonelib Feb 24, 2022
52f4312
add dvae dalle_vae
firestonelib Feb 24, 2022
3be2dbd
add beit
firestonelib Feb 24, 2022
1c11a36
add beit
firestonelib Feb 24, 2022
9ae79a6
add beit
firestonelib Feb 24, 2022
d775e00
add beit
firestonelib Feb 24, 2022
4287fc6
add beit
firestonelib Feb 24, 2022
ed4c995
add beit
firestonelib Feb 24, 2022
e818aa6
add beit
firestonelib Feb 24, 2022
f24c97a
add beit
firestonelib Feb 24, 2022
9ba49fb
add layer decay
firestonelib Feb 24, 2022
3bbc380
add layer decay
firestonelib Feb 24, 2022
b0470d3
add beit
firestonelib Feb 24, 2022
af212a5
add device
firestonelib Feb 24, 2022
c16a4e6
add device
firestonelib Feb 24, 2022
a795326
add device
firestonelib Feb 24, 2022
a551496
add device
firestonelib Feb 24, 2022
6d757f2
add device
firestonelib Feb 24, 2022
c87f37a
add device
firestonelib Feb 24, 2022
76a7865
add device
firestonelib Feb 24, 2022
4afdd70
add device
firestonelib Feb 24, 2022
e7519ef
add device
firestonelib Feb 24, 2022
420168c
add device
firestonelib Feb 24, 2022
7d04e41
add device
firestonelib Feb 24, 2022
e92d7c6
add device
firestonelib Feb 24, 2022
a81f8c0
add device
firestonelib Feb 24, 2022
b2dc1c6
add device
firestonelib Feb 24, 2022
91f1dfa
add device
firestonelib Feb 24, 2022
f19f75a
add device
firestonelib Feb 24, 2022
2e53c42
add device
firestonelib Feb 24, 2022
5d09f1c
add device
firestonelib Feb 24, 2022
1c0e1f6
add device
firestonelib Feb 24, 2022
1322d82
add device
firestonelib Feb 24, 2022
f08a167
add device
firestonelib Feb 24, 2022
3552a2b
add device
firestonelib Feb 24, 2022
cd5607b
add device
firestonelib Feb 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions configs/beit/beit_base_p16_224_ft_1k.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
epochs: 100
output_dir: output_dir
seed: 0
device: gpu

model:
name: BEiTFTWrapper
architecture:
name: VisionTransformerForFinetune
img_size: 224
embed_dim: 768
patch_size: 16
depth: 12
num_heads: 12
mlp_ratio: 4
qkv_bias: True
drop_path_rate: 0.1
init_values: 0.1
use_abs_pos_emb: False
use_rel_pos_bias: True
head:
name: BEiTFTHead
num_classes: 1000
in_channels: 768

dataloader:
train:
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: True
drop_last: True
dataset:
name: ImageNet
dataroot: data/ILSVRC2012/train/
return_label: True
transforms:
- name: RandomResizedCrop
size: 224
scale: [0.08, 1.]
interpolation: 'bicubic'
- name: RandomHorizontalFlip
- name: AutoAugment
config_str: 'rand-m9-mstd0.5-inc1'
interpolation: 'bicubic'
img_size: 224
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]
- name: Transpose
- name: NormalizeImage
scale: 1.0/255.0
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]
- name: RandomErasing
prob: 0.25
mode: 'pixel'
max_count: 1
batch_transforms:
- name: Mixup
mixup_alpha: 0.8
prob: 1.
switch_prob: 0.5
mode: 'batch'
cutmix_alpha: 1.0
val:
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 64
shuffle: false
drop_last: false
dataset:
name: ImageNet
dataroot: data/ILSVRC2012/val
return_label: True
transforms:
- name: Resize
size: 256
interpolation: 'bicubic'
- name: CenterCrop
size: 224
- name: Transpose
- name: Normalize
mean: [123.675, 116.28, 103.53]
std: [58.395, 57.12, 57.375]

lr_scheduler:
name: LinearWarmup
learning_rate:
name: CosineAnnealingDecay
learning_rate: 4e-3
T_max: 100
eta_min: 1e-6
warmup_steps: 20
start_lr: 0
end_lr: 4e-3

optimizer:
name: AdamW
beta1: 0.9
beta2: 0.999
weight_decay: 0.05
epsilon: 1e-8
exclude_from_weight_decay: ["pos_embed","cls_token",".bias","norm","gamma"]
layer_decay: 0.65

log_config:
name: LogHook
interval: 10

checkpoint:
name: CheckpointHook
by_epoch: true
interval: 1

custom_config:
- name: EvaluateHook

vdl_config:
name: VisualHook
104 changes: 104 additions & 0 deletions configs/beit/beit_base_p16_224_pt_1k.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
epochs: 800
output_dir: output_dir
seed: 0
device: gpu

model:
name: BEiTPTWrapper
architecture:
name: VisionTransformerForMaskedImageModeling
img_size: 224
embed_dim: 768
patch_size: 16
depth: 12
num_heads: 12
mlp_ratio: 4
use_abs_pos_emb: False
use_rel_pos_bias: False
use_shared_rel_pos_bias: True
init_values: 0.1
drop_path_rate: 0.1
head:
name: BEiTPTHead
num_classes: 1000
in_channels: 768
d_vae:
name: dall-e
weight_path: 'dvae/'
image_size: 112

dataloader:
train:
loader:
num_workers: 0
use_shared_memory: False
sampler:
batch_size: 128
shuffle: True
drop_last: True
dataset:
name: BEiT_ImageNet
dataroot: data/ILSVRC2012/train/
common_transforms:
- name: ToRGB
- name: ColorJitter
brightness: 0.4
contrast: 0.4
saturation: 0.4
hue: 0.4
- name: RandomHorizontalFlip
- name: RandomResizedCropAndInterpolationWithTwoPic
size: 224
second_size: 112
interpolation: 'bicubic'
second_interpolation: 'lanczos'
patch_transforms:
- name: Transpose
- name: NormalizeImage
scale: 1.0/255.0
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
visual_token_transforms:
- name: Transpose
- name: VisualTokenMap
mode: 'map_pixels'
scale: 255
masking_generator:
input_size: 14
num_masking_patches: 75
max_num_patches: None
min_num_patches: 16

lr_scheduler:
name: LinearWarmup
learning_rate:
name: CosineAnnealingDecay
learning_rate: 3e-3
T_max: 800
eta_min: 1e-5
warmup_steps: 10
start_lr: 0
end_lr: 3e-3

optimizer:
name: AdamW
beta1: 0.9
beta2: 0.999
weight_decay: 0.05
epsilon: 1e-8
exclude_from_weight_decay: ["pos_embed","cls_token",".bias","norm","gamma"]
grad_clip:
name: global_norm
value: 3.0

log_config:
name: LogHook
interval: 1

checkpoint:
name: CheckpointHook
by_epoch: True
interval: 1

vdl_config:
name: VisualHook
14 changes: 10 additions & 4 deletions configs/byol/byol_clas_r50.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 100
output_dir: output_dir
seed: 0
device: gpu

model:
name: ByolClassification
Expand All @@ -16,7 +18,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand All @@ -30,11 +34,13 @@ dataloader:
- name: RandomHorizontalFlip
- name: Resize
size: [224,224]
interpolation: bicubic
interpolation: bicubic
- name: ByolNormalize
- name: Clip
val:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: false
Expand All @@ -49,7 +55,7 @@ dataloader:
- name: CenterCrop
size: 224
- name: ByolNormalize
- name: Clip
- name: Clip

lr_scheduler:
name: ByolLRScheduler
Expand Down
9 changes: 7 additions & 2 deletions configs/byol/byol_r50_IM.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
epochs: 300
use_byol_iters: True
total_images: 1281167
global_batch_size: 4096 # 128 * 4 * 8
global_batch_size: 4096
output_dir: output_dir
seed: 0
device: gpu

model:
name: BYOL
backbone:
Expand Down Expand Up @@ -33,7 +36,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: True
Expand Down
6 changes: 5 additions & 1 deletion configs/cait/cait_m36_384.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 300
output_dir: output_dir
seed: 0
device: gpu

model:
name: CaitWrapper
Expand All @@ -18,7 +20,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand Down
6 changes: 5 additions & 1 deletion configs/cait/cait_m48_448.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 300
output_dir: output_dir
seed: 0
device: gpu

model:
name: CaitWrapper
Expand All @@ -18,7 +20,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand Down
6 changes: 5 additions & 1 deletion configs/cait/cait_s24_224.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 300
output_dir: output_dir
seed: 0
device: gpu

model:
name: CaitWrapper
Expand All @@ -18,7 +20,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand Down
6 changes: 5 additions & 1 deletion configs/cait/cait_s24_384.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 300
output_dir: output_dir
seed: 0
device: gpu

model:
name: CaitWrapper
Expand All @@ -18,7 +20,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand Down
6 changes: 5 additions & 1 deletion configs/cait/cait_s36_384.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
epochs: 300
output_dir: output_dir
seed: 0
device: gpu

model:
name: CaitWrapper
Expand All @@ -18,7 +20,9 @@ model:

dataloader:
train:
num_workers: 8
loader:
num_workers: 8
use_shared_memory: True
sampler:
batch_size: 128
shuffle: true
Expand Down
Loading