mirror of
https://github.com/open-mmlab/mmclassification.git
synced 2025-06-03 21:53:55 +08:00
20 lines
658 B
Python
20 lines
658 B
Python
|
model = dict(
|
||
|
type='ImageClassifier',
|
||
|
backbone=dict(type='MViT', arch='tiny', drop_path_rate=0.1),
|
||
|
neck=dict(type='GlobalAveragePooling'),
|
||
|
head=dict(
|
||
|
type='LinearClsHead',
|
||
|
in_channels=768,
|
||
|
num_classes=1000,
|
||
|
loss=dict(
|
||
|
type='LabelSmoothLoss', label_smooth_val=0.1, mode='original'),
|
||
|
),
|
||
|
init_cfg=[
|
||
|
dict(type='TruncNormal', layer='Linear', std=0.02, bias=0.),
|
||
|
dict(type='Constant', layer='LayerNorm', val=1., bias=0.)
|
||
|
],
|
||
|
train_cfg=dict(augments=[
|
||
|
dict(type='Mixup', alpha=0.8, num_classes=1000),
|
||
|
dict(type='CutMix', alpha=1.0, num_classes=1000)
|
||
|
]))
|