Skip to content

Commit 150356c

Browse files
committed
Fix unfortunate selecsls case bug caused by aggressive IDE rename
1 parent 6e8c53d commit 150356c

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

timm/models/selecsls.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ def forward(self, x):
182182
return x
183183

184184

185-
def _create_SelecSls(variant, pretrained, **kwargs):
185+
def _create_selecsls(variant, pretrained, **kwargs):
186186
cfg = {}
187187
feature_info = [dict(num_chs=32, reduction=2, module='stem.2')]
188-
if variant.startswith('SelecSls42'):
188+
if variant.startswith('selecsls42'):
189189
cfg['block'] = SelecSlsBlock
190190
# Define configuration of the network after the initial neck
191191
cfg['features'] = [
@@ -204,7 +204,7 @@ def _create_SelecSls(variant, pretrained, **kwargs):
204204
])
205205
# Head can be replaced with alternative configurations depending on the problem
206206
feature_info.append(dict(num_chs=1024, reduction=32, module='head.1'))
207-
if variant == 'SelecSls42b':
207+
if variant == 'selecsls42b':
208208
cfg['head'] = [
209209
(480, 960, 3, 2),
210210
(960, 1024, 3, 1),
@@ -223,7 +223,7 @@ def _create_SelecSls(variant, pretrained, **kwargs):
223223
feature_info.append(dict(num_chs=1280, reduction=64, module='head.3'))
224224
cfg['num_features'] = 1280
225225

226-
elif variant.startswith('SelecSls60'):
226+
elif variant.startswith('selecsls60'):
227227
cfg['block'] = SelecSlsBlock
228228
# Define configuration of the network after the initial neck
229229
cfg['features'] = [
@@ -245,7 +245,7 @@ def _create_SelecSls(variant, pretrained, **kwargs):
245245
])
246246
# Head can be replaced with alternative configurations depending on the problem
247247
feature_info.append(dict(num_chs=1024, reduction=32, module='head.1'))
248-
if variant == 'SelecSls60b':
248+
if variant == 'selecsls60b':
249249
cfg['head'] = [
250250
(416, 756, 3, 2),
251251
(756, 1024, 3, 1),
@@ -264,7 +264,7 @@ def _create_SelecSls(variant, pretrained, **kwargs):
264264
feature_info.append(dict(num_chs=1280, reduction=64, module='head.3'))
265265
cfg['num_features'] = 1280
266266

267-
elif variant == 'SelecSls84':
267+
elif variant == 'selecsls84':
268268
cfg['block'] = SelecSlsBlock
269269
# Define configuration of the network after the initial neck
270270
cfg['features'] = [
@@ -327,52 +327,52 @@ def _cfg(url='', **kwargs):
327327

328328

329329
default_cfgs = generate_default_cfgs({
330-
'SelecSls42.untrained': _cfg(
330+
'selecsls42.untrained': _cfg(
331331
interpolation='bicubic'),
332-
'SelecSls42b.in1k': _cfg(
332+
'selecsls42b.in1k': _cfg(
333333
hf_hub_id='timm/',
334334
interpolation='bicubic'),
335-
'SelecSls60.in1k': _cfg(
335+
'selecsls60.in1k': _cfg(
336336
hf_hub_id='timm/',
337337
interpolation='bicubic'),
338-
'SelecSls60b.in1k': _cfg(
338+
'selecsls60b.in1k': _cfg(
339339
hf_hub_id='timm/',
340340
interpolation='bicubic'),
341-
'SelecSls84.untrained': _cfg(
341+
'selecsls84.untrained': _cfg(
342342
interpolation='bicubic'),
343343
})
344344

345345

346346
@register_model
347-
def SelecSls42(pretrained=False, **kwargs) -> SelecSls:
347+
def selecsls42(pretrained=False, **kwargs) -> SelecSls:
348348
"""Constructs a SelecSls42 model.
349349
"""
350-
return _create_SelecSls('SelecSls42', pretrained, **kwargs)
350+
return _create_selecsls('selecsls42', pretrained, **kwargs)
351351

352352

353353
@register_model
354-
def SelecSls42b(pretrained=False, **kwargs) -> SelecSls:
354+
def selecsls42b(pretrained=False, **kwargs) -> SelecSls:
355355
"""Constructs a SelecSls42_B model.
356356
"""
357-
return _create_SelecSls('SelecSls42b', pretrained, **kwargs)
357+
return _create_selecsls('selecsls42b', pretrained, **kwargs)
358358

359359

360360
@register_model
361-
def SelecSls60(pretrained=False, **kwargs) -> SelecSls:
361+
def selecsls60(pretrained=False, **kwargs) -> SelecSls:
362362
"""Constructs a SelecSls60 model.
363363
"""
364-
return _create_SelecSls('SelecSls60', pretrained, **kwargs)
364+
return _create_selecsls('selecsls60', pretrained, **kwargs)
365365

366366

367367
@register_model
368-
def SelecSls60b(pretrained=False, **kwargs) -> SelecSls:
368+
def selecsls60b(pretrained=False, **kwargs) -> SelecSls:
369369
"""Constructs a SelecSls60_B model.
370370
"""
371-
return _create_SelecSls('SelecSls60b', pretrained, **kwargs)
371+
return _create_selecsls('selecsls60b', pretrained, **kwargs)
372372

373373

374374
@register_model
375-
def SelecSls84(pretrained=False, **kwargs) -> SelecSls:
375+
def selecsls84(pretrained=False, **kwargs) -> SelecSls:
376376
"""Constructs a SelecSls84 model.
377377
"""
378-
return _create_SelecSls('SelecSls84', pretrained, **kwargs)
378+
return _create_selecsls('selecsls84', pretrained, **kwargs)

0 commit comments

Comments
 (0)