mirror of
https://github.com/open-mmlab/mmpretrain.git
synced 2025-06-03 14:59:18 +08:00
* [Improve] Speed up data preprocessor. * Add ClsDataSample serialization override functions. * Add unit tests * Modify configs to fit new mixup args. * Fix `num_classes` of the ImageNet-21k config. * Update docs.
23 lines
551 B
Python
23 lines
551 B
Python
model = dict(
|
|
type='ImageClassifier',
|
|
backbone=dict(
|
|
type='RepVGG',
|
|
arch='B3',
|
|
out_indices=(3, ),
|
|
),
|
|
neck=dict(type='GlobalAveragePooling'),
|
|
head=dict(
|
|
type='LinearClsHead',
|
|
num_classes=1000,
|
|
in_channels=2560,
|
|
loss=dict(
|
|
type='LabelSmoothLoss',
|
|
loss_weight=1.0,
|
|
label_smooth_val=0.1,
|
|
mode='classy_vision',
|
|
num_classes=1000),
|
|
topk=(1, 5),
|
|
),
|
|
train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)),
|
|
)
|