2020-07-09 23:59:10 +08:00
|
|
|
# dataset settings
|
|
|
|
dataset_type = 'CIFAR10'
|
|
|
|
img_norm_cfg = dict(
|
|
|
|
mean=[125.307, 122.961, 113.8575],
|
|
|
|
std=[51.5865, 50.847, 51.255],
|
2021-05-31 14:15:22 +08:00
|
|
|
to_rgb=False)
|
2020-07-09 23:59:10 +08:00
|
|
|
train_pipeline = [
|
|
|
|
dict(type='RandomCrop', size=32, padding=4),
|
|
|
|
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'),
|
|
|
|
dict(type='Normalize', **img_norm_cfg),
|
|
|
|
dict(type='ImageToTensor', keys=['img']),
|
|
|
|
dict(type='ToTensor', keys=['gt_label']),
|
|
|
|
dict(type='Collect', keys=['img', 'gt_label'])
|
|
|
|
]
|
|
|
|
test_pipeline = [
|
|
|
|
dict(type='Normalize', **img_norm_cfg),
|
|
|
|
dict(type='ImageToTensor', keys=['img']),
|
2020-10-01 22:15:14 +08:00
|
|
|
dict(type='Collect', keys=['img'])
|
2020-07-09 23:59:10 +08:00
|
|
|
]
|
|
|
|
data = dict(
|
2020-08-26 16:34:15 +08:00
|
|
|
samples_per_gpu=16,
|
2020-07-09 23:59:10 +08:00
|
|
|
workers_per_gpu=2,
|
|
|
|
train=dict(
|
|
|
|
type=dataset_type, data_prefix='data/cifar10',
|
|
|
|
pipeline=train_pipeline),
|
|
|
|
val=dict(
|
2021-05-27 15:20:25 +08:00
|
|
|
type=dataset_type,
|
|
|
|
data_prefix='data/cifar10',
|
|
|
|
pipeline=test_pipeline,
|
|
|
|
test_mode=True),
|
2020-07-09 23:59:10 +08:00
|
|
|
test=dict(
|
2021-05-27 15:20:25 +08:00
|
|
|
type=dataset_type,
|
|
|
|
data_prefix='data/cifar10',
|
|
|
|
pipeline=test_pipeline,
|
|
|
|
test_mode=True))
|