Skip to content

Commit 0aca083

Browse files
committed
Update regnet cfg keys to match model names so registry works properly
1 parent b41b8d0 commit 0aca083

File tree

1 file changed

+72
-72
lines changed

1 file changed

+72
-72
lines changed

timm/models/regnet.py

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,30 @@ def _mcfg(**kwargs):
3131

3232
# Model FLOPS = three trailing digits * 10^8
3333
model_cfgs = dict(
34-
x_002=_mcfg(w0=24, wa=36.44, wm=2.49, group_w=8, depth=13),
35-
x_004=_mcfg(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22),
36-
x_006=_mcfg(w0=48, wa=36.97, wm=2.24, group_w=24, depth=16),
37-
x_008=_mcfg(w0=56, wa=35.73, wm=2.28, group_w=16, depth=16),
38-
x_016=_mcfg(w0=80, wa=34.01, wm=2.25, group_w=24, depth=18),
39-
x_032=_mcfg(w0=88, wa=26.31, wm=2.25, group_w=48, depth=25),
40-
x_040=_mcfg(w0=96, wa=38.65, wm=2.43, group_w=40, depth=23),
41-
x_064=_mcfg(w0=184, wa=60.83, wm=2.07, group_w=56, depth=17),
42-
x_080=_mcfg(w0=80, wa=49.56, wm=2.88, group_w=120, depth=23),
43-
x_120=_mcfg(w0=168, wa=73.36, wm=2.37, group_w=112, depth=19),
44-
x_160=_mcfg(w0=216, wa=55.59, wm=2.1, group_w=128, depth=22),
45-
x_320=_mcfg(w0=320, wa=69.86, wm=2.0, group_w=168, depth=23),
46-
y_002=_mcfg(w0=24, wa=36.44, wm=2.49, group_w=8, depth=13, se_ratio=0.25),
47-
y_004=_mcfg(w0=48, wa=27.89, wm=2.09, group_w=8, depth=16, se_ratio=0.25),
48-
y_006=_mcfg(w0=48, wa=32.54, wm=2.32, group_w=16, depth=15, se_ratio=0.25),
49-
y_008=_mcfg(w0=56, wa=38.84, wm=2.4, group_w=16, depth=14, se_ratio=0.25),
50-
y_016=_mcfg(w0=48, wa=20.71, wm=2.65, group_w=24, depth=27, se_ratio=0.25),
51-
y_032=_mcfg(w0=80, wa=42.63, wm=2.66, group_w=24, depth=21, se_ratio=0.25),
52-
y_040=_mcfg(w0=96, wa=31.41, wm=2.24, group_w=64, depth=22, se_ratio=0.25),
53-
y_064=_mcfg(w0=112, wa=33.22, wm=2.27, group_w=72, depth=25, se_ratio=0.25),
54-
y_080=_mcfg(w0=192, wa=76.82, wm=2.19, group_w=56, depth=17, se_ratio=0.25),
55-
y_120=_mcfg(w0=168, wa=73.36, wm=2.37, group_w=112, depth=19, se_ratio=0.25),
56-
y_160=_mcfg(w0=200, wa=106.23, wm=2.48, group_w=112, depth=18, se_ratio=0.25),
57-
y_320=_mcfg(w0=232, wa=115.89, wm=2.53, group_w=232, depth=20, se_ratio=0.25),
34+
regnetx_002=_mcfg(w0=24, wa=36.44, wm=2.49, group_w=8, depth=13),
35+
regnetx_004=_mcfg(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22),
36+
regnetx_006=_mcfg(w0=48, wa=36.97, wm=2.24, group_w=24, depth=16),
37+
regnetx_008=_mcfg(w0=56, wa=35.73, wm=2.28, group_w=16, depth=16),
38+
regnetx_016=_mcfg(w0=80, wa=34.01, wm=2.25, group_w=24, depth=18),
39+
regnetx_032=_mcfg(w0=88, wa=26.31, wm=2.25, group_w=48, depth=25),
40+
regnetx_040=_mcfg(w0=96, wa=38.65, wm=2.43, group_w=40, depth=23),
41+
regnetx_064=_mcfg(w0=184, wa=60.83, wm=2.07, group_w=56, depth=17),
42+
regnetx_080=_mcfg(w0=80, wa=49.56, wm=2.88, group_w=120, depth=23),
43+
regnetx_120=_mcfg(w0=168, wa=73.36, wm=2.37, group_w=112, depth=19),
44+
regnetx_160=_mcfg(w0=216, wa=55.59, wm=2.1, group_w=128, depth=22),
45+
regnetx_320=_mcfg(w0=320, wa=69.86, wm=2.0, group_w=168, depth=23),
46+
regnety_002=_mcfg(w0=24, wa=36.44, wm=2.49, group_w=8, depth=13, se_ratio=0.25),
47+
regnety_004=_mcfg(w0=48, wa=27.89, wm=2.09, group_w=8, depth=16, se_ratio=0.25),
48+
regnety_006=_mcfg(w0=48, wa=32.54, wm=2.32, group_w=16, depth=15, se_ratio=0.25),
49+
regnety_008=_mcfg(w0=56, wa=38.84, wm=2.4, group_w=16, depth=14, se_ratio=0.25),
50+
regnety_016=_mcfg(w0=48, wa=20.71, wm=2.65, group_w=24, depth=27, se_ratio=0.25),
51+
regnety_032=_mcfg(w0=80, wa=42.63, wm=2.66, group_w=24, depth=21, se_ratio=0.25),
52+
regnety_040=_mcfg(w0=96, wa=31.41, wm=2.24, group_w=64, depth=22, se_ratio=0.25),
53+
regnety_064=_mcfg(w0=112, wa=33.22, wm=2.27, group_w=72, depth=25, se_ratio=0.25),
54+
regnety_080=_mcfg(w0=192, wa=76.82, wm=2.19, group_w=56, depth=17, se_ratio=0.25),
55+
regnety_120=_mcfg(w0=168, wa=73.36, wm=2.37, group_w=112, depth=19, se_ratio=0.25),
56+
regnety_160=_mcfg(w0=200, wa=106.23, wm=2.48, group_w=112, depth=18, se_ratio=0.25),
57+
regnety_320=_mcfg(w0=232, wa=115.89, wm=2.53, group_w=232, depth=20, se_ratio=0.25),
5858
)
5959

6060

@@ -68,30 +68,30 @@ def _cfg(url=''):
6868

6969

7070
default_cfgs = dict(
71-
x_002=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_002-e7e85e5c.pth'),
72-
x_004=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_004-7d0e9424.pth'),
73-
x_006=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_006-85ec1baa.pth'),
74-
x_008=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_008-d8b470eb.pth'),
75-
x_016=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_016-65ca972a.pth'),
76-
x_032=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_032-ed0c7f7e.pth'),
77-
x_040=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_040-73c2a654.pth'),
78-
x_064=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_064-29278baa.pth'),
79-
x_080=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_080-7c7fcab1.pth'),
80-
x_120=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_120-65d5521e.pth'),
81-
x_160=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_160-c98c4112.pth'),
82-
x_320=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_320-8ea38b93.pth'),
83-
y_002=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_002-e68ca334.pth'),
84-
y_004=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_004-0db870e6.pth'),
85-
y_006=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_006-c67e57ec.pth'),
86-
y_008=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_008-dc900dbe.pth'),
87-
y_016=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_016-54367f74.pth'),
88-
y_032=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_032-62b47782.pth'),
89-
y_040=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_040-f0d569f9.pth'),
90-
y_064=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_064-0a48325c.pth'),
91-
y_080=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_080-e7f3eb93.pth'),
92-
y_120=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_120-721ba79a.pth'),
93-
y_160=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_160-d64013cd.pth'),
94-
y_320=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_320-ba464b29.pth'),
71+
regnetx_002=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_002-e7e85e5c.pth'),
72+
regnetx_004=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_004-7d0e9424.pth'),
73+
regnetx_006=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_006-85ec1baa.pth'),
74+
regnetx_008=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_008-d8b470eb.pth'),
75+
regnetx_016=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_016-65ca972a.pth'),
76+
regnetx_032=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_032-ed0c7f7e.pth'),
77+
regnetx_040=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_040-73c2a654.pth'),
78+
regnetx_064=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_064-29278baa.pth'),
79+
regnetx_080=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_080-7c7fcab1.pth'),
80+
regnetx_120=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_120-65d5521e.pth'),
81+
regnetx_160=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_160-c98c4112.pth'),
82+
regnetx_320=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnetx_320-8ea38b93.pth'),
83+
regnety_002=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_002-e68ca334.pth'),
84+
regnety_004=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_004-0db870e6.pth'),
85+
regnety_006=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_006-c67e57ec.pth'),
86+
regnety_008=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_008-dc900dbe.pth'),
87+
regnety_016=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_016-54367f74.pth'),
88+
regnety_032=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_032-62b47782.pth'),
89+
regnety_040=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_040-f0d569f9.pth'),
90+
regnety_064=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_064-0a48325c.pth'),
91+
regnety_080=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_080-e7f3eb93.pth'),
92+
regnety_120=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_120-721ba79a.pth'),
93+
regnety_160=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_160-d64013cd.pth'),
94+
regnety_320=_cfg(url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-regnet/regnety_320-ba464b29.pth'),
9595
)
9696

9797

@@ -344,142 +344,142 @@ def _regnet(variant, pretrained, **kwargs):
344344
@register_model
345345
def regnetx_002(pretrained=False, **kwargs):
346346
"""RegNetX-200MF"""
347-
return _regnet('x_002', pretrained, **kwargs)
347+
return _regnet('regnetx_002', pretrained, **kwargs)
348348

349349

350350
@register_model
351351
def regnetx_004(pretrained=False, **kwargs):
352352
"""RegNetX-400MF"""
353-
return _regnet('x_004', pretrained, **kwargs)
353+
return _regnet('regnetx_004', pretrained, **kwargs)
354354

355355

356356
@register_model
357357
def regnetx_006(pretrained=False, **kwargs):
358358
"""RegNetX-600MF"""
359-
return _regnet('x_006', pretrained, **kwargs)
359+
return _regnet('regnetx_006', pretrained, **kwargs)
360360

361361

362362
@register_model
363363
def regnetx_008(pretrained=False, **kwargs):
364364
"""RegNetX-800MF"""
365-
return _regnet('x_008', pretrained, **kwargs)
365+
return _regnet('regnetx_008', pretrained, **kwargs)
366366

367367

368368
@register_model
369369
def regnetx_016(pretrained=False, **kwargs):
370370
"""RegNetX-1.6GF"""
371-
return _regnet('x_016', pretrained, **kwargs)
371+
return _regnet('regnetx_016', pretrained, **kwargs)
372372

373373

374374
@register_model
375375
def regnetx_032(pretrained=False, **kwargs):
376376
"""RegNetX-3.2GF"""
377-
return _regnet('x_032', pretrained, **kwargs)
377+
return _regnet('regnetx_032', pretrained, **kwargs)
378378

379379

380380
@register_model
381381
def regnetx_040(pretrained=False, **kwargs):
382382
"""RegNetX-4.0GF"""
383-
return _regnet('x_040', pretrained, **kwargs)
383+
return _regnet('regnetx_040', pretrained, **kwargs)
384384

385385

386386
@register_model
387387
def regnetx_064(pretrained=False, **kwargs):
388388
"""RegNetX-6.4GF"""
389-
return _regnet('x_064', pretrained, **kwargs)
389+
return _regnet('regnetx_064', pretrained, **kwargs)
390390

391391

392392
@register_model
393393
def regnetx_080(pretrained=False, **kwargs):
394394
"""RegNetX-8.0GF"""
395-
return _regnet('x_080', pretrained, **kwargs)
395+
return _regnet('regnetx_080', pretrained, **kwargs)
396396

397397

398398
@register_model
399399
def regnetx_120(pretrained=False, **kwargs):
400400
"""RegNetX-12GF"""
401-
return _regnet('x_120', pretrained, **kwargs)
401+
return _regnet('regnetx_120', pretrained, **kwargs)
402402

403403

404404
@register_model
405405
def regnetx_160(pretrained=False, **kwargs):
406406
"""RegNetX-16GF"""
407-
return _regnet('x_160', pretrained, **kwargs)
407+
return _regnet('regnetx_160', pretrained, **kwargs)
408408

409409

410410
@register_model
411411
def regnetx_320(pretrained=False, **kwargs):
412412
"""RegNetX-32GF"""
413-
return _regnet('x_320', pretrained, **kwargs)
413+
return _regnet('regnetx_320', pretrained, **kwargs)
414414

415415

416416
@register_model
417417
def regnety_002(pretrained=False, **kwargs):
418418
"""RegNetY-200MF"""
419-
return _regnet('y_002', pretrained, **kwargs)
419+
return _regnet('regnety_002', pretrained, **kwargs)
420420

421421

422422
@register_model
423423
def regnety_004(pretrained=False, **kwargs):
424424
"""RegNetY-400MF"""
425-
return _regnet('y_004', pretrained, **kwargs)
425+
return _regnet('regnety_004', pretrained, **kwargs)
426426

427427

428428
@register_model
429429
def regnety_006(pretrained=False, **kwargs):
430430
"""RegNetY-600MF"""
431-
return _regnet('y_006', pretrained, **kwargs)
431+
return _regnet('regnety_006', pretrained, **kwargs)
432432

433433

434434
@register_model
435435
def regnety_008(pretrained=False, **kwargs):
436436
"""RegNetY-800MF"""
437-
return _regnet('y_008', pretrained, **kwargs)
437+
return _regnet('regnety_008', pretrained, **kwargs)
438438

439439

440440
@register_model
441441
def regnety_016(pretrained=False, **kwargs):
442442
"""RegNetY-1.6GF"""
443-
return _regnet('y_016', pretrained, **kwargs)
443+
return _regnet('regnety_016', pretrained, **kwargs)
444444

445445

446446
@register_model
447447
def regnety_032(pretrained=False, **kwargs):
448448
"""RegNetY-3.2GF"""
449-
return _regnet('y_032', pretrained, **kwargs)
449+
return _regnet('regnety_032', pretrained, **kwargs)
450450

451451

452452
@register_model
453453
def regnety_040(pretrained=False, **kwargs):
454454
"""RegNetY-4.0GF"""
455-
return _regnet('y_040', pretrained, **kwargs)
455+
return _regnet('regnety_040', pretrained, **kwargs)
456456

457457

458458
@register_model
459459
def regnety_064(pretrained=False, **kwargs):
460460
"""RegNetY-6.4GF"""
461-
return _regnet('y_064', pretrained, **kwargs)
461+
return _regnet('regnety_064', pretrained, **kwargs)
462462

463463

464464
@register_model
465465
def regnety_080(pretrained=False, **kwargs):
466466
"""RegNetY-8.0GF"""
467-
return _regnet('y_080', pretrained, **kwargs)
467+
return _regnet('regnety_080', pretrained, **kwargs)
468468

469469

470470
@register_model
471471
def regnety_120(pretrained=False, **kwargs):
472472
"""RegNetY-12GF"""
473-
return _regnet('y_120', pretrained, **kwargs)
473+
return _regnet('regnety_120', pretrained, **kwargs)
474474

475475

476476
@register_model
477477
def regnety_160(pretrained=False, **kwargs):
478478
"""RegNetY-16GF"""
479-
return _regnet('y_160', pretrained, **kwargs)
479+
return _regnet('regnety_160', pretrained, **kwargs)
480480

481481

482482
@register_model
483483
def regnety_320(pretrained=False, **kwargs):
484484
"""RegNetY-32GF"""
485-
return _regnet('y_320', pretrained, **kwargs)
485+
return _regnet('regnety_320', pretrained, **kwargs)

0 commit comments

Comments
 (0)