2021-04-13 20:15:29 +08:00
|
|
|
# dataset settings
|
|
|
|
dataset_type = 'CIFAR100'
|
|
|
|
img_norm_cfg = dict(
|
|
|
|
mean=[129.304, 124.070, 112.434],
|
|
|
|
std=[68.170, 65.392, 70.418],
|
|
|
|
to_rgb=True)
|
|
|
|
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']),
|
|
|
|
dict(type='Collect', keys=['img'])
|
|
|
|
]
|
|
|
|
data = dict(
|
|
|
|
samples_per_gpu=16,
|
|
|
|
workers_per_gpu=2,
|
|
|
|
train=dict(
|
|
|
|
type=dataset_type,
|
|
|
|
data_prefix='data/cifar100',
|
|
|
|
pipeline=train_pipeline),
|
|
|
|
val=dict(
|
2021-05-27 15:20:25 +08:00
|
|
|
type=dataset_type,
|
|
|
|
data_prefix='data/cifar100',
|
|
|
|
pipeline=test_pipeline,
|
|
|
|
test_mode=True),
|
2021-04-13 20:15:29 +08:00
|
|
|
test=dict(
|
2021-05-27 15:20:25 +08:00
|
|
|
type=dataset_type,
|
|
|
|
data_prefix='data/cifar100',
|
|
|
|
pipeline=test_pipeline,
|
|
|
|
test_mode=True))
|