Ma Zerun 5de480ea9e
[Feature] Support HRNet and add pre-trained models (#660)
* Support HRNet

* Add HRNet configs

* Fix a bug in backward

* Add configs and update docs.

* Not use bias in conv before batch norm

* Defaults to use `norm_eval=False`

* Add unit tests and support out_channels in HRFuseScales

* Update checkpoint path

* Update docstring.

* Remove incorrect files

* Improve according to comments
2022-01-28 10:54:14 +08:00

16 lines
419 B
Python

# model settings
model = dict(
type='ImageClassifier',
backbone=dict(type='HRNet', arch='w64'),
neck=[
dict(type='HRFuseScales', in_channels=(64, 128, 256, 512)),
dict(type='GlobalAveragePooling'),
],
head=dict(
type='LinearClsHead',
in_channels=2048,
num_classes=1000,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
topk=(1, 5),
))