Spaces:
Runtime error
Runtime error
File size: 642 Bytes
f549064 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from mmcls.models import build_classifier
model = dict(
type='ImageClassifier',
backbone=dict(
type='RepLKNet',
arch='31B',
out_indices=(3, ),
),
neck=dict(type='GlobalAveragePooling'),
head=dict(
type='LinearClsHead',
num_classes=1000,
in_channels=1024,
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
topk=(1, 5),
))
if __name__ == '__main__':
# model.pop('type')
model = build_classifier(model)
model.eval()
print('------------------- training-time model -------------')
for i in model.state_dict().keys():
print(i)
|