forked from open-mmlab/mmpretrain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Improvement] Rename config files according to the config name standa…
…rd. (open-mmlab#508) * Update tnt config * Rename config files * Update docs * Update metafile in dev_scripts * Fix some files * Remove fp16 metafile and README. * Fix names in metafiles.
- Loading branch information
Showing
173 changed files
with
2,410 additions
and
2,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
_base_ = ['../resnet/resnet50_b32x8_imagenet.py'] | ||
_base_ = '../resnet/resnet50_8xb32-fp16-dynamic_in1k.py' | ||
|
||
# fp16 settings | ||
fp16 = dict(loss_scale='dynamic') | ||
_deprecation_ = dict( | ||
expected='../resnet/resnet50_8xb32-fp16-dynamic_in1k.py', | ||
reference='https://github.com/open-mmlab/mmclassification/pull/508', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
_base_ = ['../resnet/resnet50_b32x8_imagenet.py'] | ||
_base_ = '../resnet/resnet50_8xb32-fp16_in1k.py' | ||
|
||
# fp16 settings | ||
fp16 = dict(loss_scale=512.) | ||
_deprecation_ = dict( | ||
expected='../resnet/resnet50_8xb32-fp16_in1k.py', | ||
reference='https://github.com/open-mmlab/mmclassification/pull/508', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
_base_ = [ | ||
'../_base_/models/mobilenet_v2_1x.py', | ||
'../_base_/datasets/imagenet_bs32_pil_resize.py', | ||
'../_base_/schedules/imagenet_bs256_epochstep.py', | ||
'../_base_/default_runtime.py' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
_base_ = [ | ||
'../_base_/models/mobilenet_v2_1x.py', | ||
'../_base_/datasets/imagenet_bs32_pil_resize.py', | ||
'../_base_/schedules/imagenet_bs256_epochstep.py', | ||
'../_base_/default_runtime.py' | ||
] | ||
_base_ = 'mobilenet-v2_8xb32_in1k.py' | ||
|
||
_deprecation_ = dict( | ||
expected='mobilenet-v2_8xb32_in1k.py', | ||
reference='https://github.com/open-mmlab/mmclassification/pull/508', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# Refer to https://pytorch.org/blog/ml-models-torchvision-v0.9/#classification | ||
# ---------------------------- | ||
# -[x] auto_augment='imagenet' | ||
# -[x] batch_size=128 (per gpu) | ||
# -[x] epochs=600 | ||
# -[x] opt='rmsprop' | ||
# -[x] lr=0.064 | ||
# -[x] eps=0.0316 | ||
# -[x] alpha=0.9 | ||
# -[x] weight_decay=1e-05 | ||
# -[x] momentum=0.9 | ||
# -[x] lr_gamma=0.973 | ||
# -[x] lr_step_size=2 | ||
# -[x] nproc_per_node=8 | ||
# -[x] random_erase=0.2 | ||
# -[x] workers=16 (workers_per_gpu) | ||
# - modify: RandomErasing use RE-M instead of RE-0 | ||
|
||
_base_ = [ | ||
'../_base_/models/mobilenet-v3-large_8xb32_in1k.py', | ||
'../_base_/datasets/imagenet_bs32_pil_resize.py', | ||
'../_base_/default_runtime.py' | ||
] | ||
|
||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
|
||
policies = [ | ||
[ | ||
dict(type='Posterize', bits=4, prob=0.4), | ||
dict(type='Rotate', angle=30., prob=0.6) | ||
], | ||
[ | ||
dict(type='Solarize', thr=256 / 9 * 4, prob=0.6), | ||
dict(type='AutoContrast', prob=0.6) | ||
], | ||
[dict(type='Equalize', prob=0.8), | ||
dict(type='Equalize', prob=0.6)], | ||
[ | ||
dict(type='Posterize', bits=5, prob=0.6), | ||
dict(type='Posterize', bits=5, prob=0.6) | ||
], | ||
[ | ||
dict(type='Equalize', prob=0.4), | ||
dict(type='Solarize', thr=256 / 9 * 5, prob=0.2) | ||
], | ||
[ | ||
dict(type='Equalize', prob=0.4), | ||
dict(type='Rotate', angle=30 / 9 * 8, prob=0.8) | ||
], | ||
[ | ||
dict(type='Solarize', thr=256 / 9 * 6, prob=0.6), | ||
dict(type='Equalize', prob=0.6) | ||
], | ||
[dict(type='Posterize', bits=6, prob=0.8), | ||
dict(type='Equalize', prob=1.)], | ||
[ | ||
dict(type='Rotate', angle=10., prob=0.2), | ||
dict(type='Solarize', thr=256 / 9, prob=0.6) | ||
], | ||
[ | ||
dict(type='Equalize', prob=0.6), | ||
dict(type='Posterize', bits=5, prob=0.4) | ||
], | ||
[ | ||
dict(type='Rotate', angle=30 / 9 * 8, prob=0.8), | ||
dict(type='ColorTransform', magnitude=0., prob=0.4) | ||
], | ||
[ | ||
dict(type='Rotate', angle=30., prob=0.4), | ||
dict(type='Equalize', prob=0.6) | ||
], | ||
[dict(type='Equalize', prob=0.0), | ||
dict(type='Equalize', prob=0.8)], | ||
[dict(type='Invert', prob=0.6), | ||
dict(type='Equalize', prob=1.)], | ||
[ | ||
dict(type='ColorTransform', magnitude=0.4, prob=0.6), | ||
dict(type='Contrast', magnitude=0.8, prob=1.) | ||
], | ||
[ | ||
dict(type='Rotate', angle=30 / 9 * 8, prob=0.8), | ||
dict(type='ColorTransform', magnitude=0.2, prob=1.) | ||
], | ||
[ | ||
dict(type='ColorTransform', magnitude=0.8, prob=0.8), | ||
dict(type='Solarize', thr=256 / 9 * 2, prob=0.8) | ||
], | ||
[ | ||
dict(type='Sharpness', magnitude=0.7, prob=0.4), | ||
dict(type='Invert', prob=0.6) | ||
], | ||
[ | ||
dict( | ||
type='Shear', | ||
magnitude=0.3 / 9 * 5, | ||
prob=0.6, | ||
direction='horizontal'), | ||
dict(type='Equalize', prob=1.) | ||
], | ||
[ | ||
dict(type='ColorTransform', magnitude=0., prob=0.4), | ||
dict(type='Equalize', prob=0.6) | ||
], | ||
[ | ||
dict(type='Equalize', prob=0.4), | ||
dict(type='Solarize', thr=256 / 9 * 5, prob=0.2) | ||
], | ||
[ | ||
dict(type='Solarize', thr=256 / 9 * 4, prob=0.6), | ||
dict(type='AutoContrast', prob=0.6) | ||
], | ||
[dict(type='Invert', prob=0.6), | ||
dict(type='Equalize', prob=1.)], | ||
[ | ||
dict(type='ColorTransform', magnitude=0.4, prob=0.6), | ||
dict(type='Contrast', magnitude=0.8, prob=1.) | ||
], | ||
[dict(type='Equalize', prob=0.8), | ||
dict(type='Equalize', prob=0.6)], | ||
] | ||
|
||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='RandomResizedCrop', size=224, backend='pillow'), | ||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'), | ||
dict(type='AutoAugment', policies=policies), | ||
dict( | ||
type='RandomErasing', | ||
erase_prob=0.2, | ||
mode='const', | ||
min_area_ratio=0.02, | ||
max_area_ratio=1 / 3, | ||
fill_color=img_norm_cfg['mean']), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='ToTensor', keys=['gt_label']), | ||
dict(type='Collect', keys=['img', 'gt_label']) | ||
] | ||
|
||
data = dict( | ||
samples_per_gpu=128, | ||
workers_per_gpu=4, | ||
train=dict(pipeline=train_pipeline)) | ||
evaluation = dict(interval=10, metric='accuracy') | ||
|
||
# optimizer | ||
optimizer = dict( | ||
type='RMSprop', | ||
lr=0.064, | ||
alpha=0.9, | ||
momentum=0.9, | ||
eps=0.0316, | ||
weight_decay=1e-5) | ||
optimizer_config = dict(grad_clip=None) | ||
# learning policy | ||
lr_config = dict(policy='step', step=2, gamma=0.973, by_epoch=True) | ||
runner = dict(type='EpochBasedRunner', max_epochs=600) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
_base_ = [ | ||
'../_base_/models/mobilenet-v3-small_8xb16_cifar.py', | ||
'../_base_/datasets/cifar10_bs16.py', | ||
'../_base_/schedules/cifar10_bs128.py', '../_base_/default_runtime.py' | ||
] | ||
|
||
lr_config = dict(policy='step', step=[120, 170]) | ||
runner = dict(type='EpochBasedRunner', max_epochs=200) |
Oops, something went wrong.