mmpretrain/configs/_base_/models/res2net50-w48-s2.py
Ma Zerun 77a3834531
[Feature] Add Res2Net backbone and converted weights. (#465)
* Add Res2Net from mmdet, and change it to mmcls style.

* Align structure with official repo

* Support `deep_stem` and `avg_down` option

* Add Res2Net configs

* Add metafile&README and update model zoo

* Add unit tests

* Imporve docstring.

* Improve according to comments.
2021-10-20 16:34:22 +08:00

19 lines
430 B
Python

model = dict(
type='ImageClassifier',
backbone=dict(
type='Res2Net',
depth=50,
scales=2,
base_width=48,
deep_stem=False,
avg_down=False,
),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=2048,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
topk=(1, 5),
))