20
20
]
21
21
22
22
23
- model_urls : Dict [str , Optional [str ]] = {
23
+ _MODELS_URLS : Dict [str , Optional [str ]] = {
24
24
"convnext_tiny" : "https://download.pytorch.org/models/convnext_tiny-983f1562.pth" ,
25
25
"convnext_small" : "https://download.pytorch.org/models/convnext_small-0c510722.pth" ,
26
26
"convnext_base" : "https://download.pytorch.org/models/convnext_base-6075fbad.pth" ,
@@ -196,14 +196,14 @@ def _convnext(
196
196
) -> ConvNeXt :
197
197
model = ConvNeXt (block_setting , stochastic_depth_prob = stochastic_depth_prob , ** kwargs )
198
198
if pretrained :
199
- if arch not in model_urls :
199
+ if arch not in _MODELS_URLS :
200
200
raise ValueError (f"No checkpoint is available for model type { arch } " )
201
- state_dict = load_state_dict_from_url (model_urls [arch ], progress = progress )
201
+ state_dict = load_state_dict_from_url (_MODELS_URLS [arch ], progress = progress )
202
202
model .load_state_dict (state_dict )
203
203
return model
204
204
205
205
206
- def convnext_tiny (pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
206
+ def convnext_tiny (* , pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
207
207
r"""ConvNeXt Tiny model architecture from the
208
208
`"A ConvNet for the 2020s" <https://arxiv.org/abs/2201.03545>`_ paper.
209
209
Args:
@@ -220,7 +220,7 @@ def convnext_tiny(pretrained: bool = False, progress: bool = True, **kwargs: Any
220
220
return _convnext ("convnext_tiny" , block_setting , stochastic_depth_prob , pretrained , progress , ** kwargs )
221
221
222
222
223
- def convnext_small (pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
223
+ def convnext_small (* , pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
224
224
r"""ConvNeXt Small model architecture from the
225
225
`"A ConvNet for the 2020s" <https://arxiv.org/abs/2201.03545>`_ paper.
226
226
Args:
@@ -237,7 +237,7 @@ def convnext_small(pretrained: bool = False, progress: bool = True, **kwargs: An
237
237
return _convnext ("convnext_small" , block_setting , stochastic_depth_prob , pretrained , progress , ** kwargs )
238
238
239
239
240
- def convnext_base (pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
240
+ def convnext_base (* , pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
241
241
r"""ConvNeXt Base model architecture from the
242
242
`"A ConvNet for the 2020s" <https://arxiv.org/abs/2201.03545>`_ paper.
243
243
Args:
@@ -254,7 +254,7 @@ def convnext_base(pretrained: bool = False, progress: bool = True, **kwargs: Any
254
254
return _convnext ("convnext_base" , block_setting , stochastic_depth_prob , pretrained , progress , ** kwargs )
255
255
256
256
257
- def convnext_large (pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
257
+ def convnext_large (* , pretrained : bool = False , progress : bool = True , ** kwargs : Any ) -> ConvNeXt :
258
258
r"""ConvNeXt Large model architecture from the
259
259
`"A ConvNet for the 2020s" <https://arxiv.org/abs/2201.03545>`_ paper.
260
260
Args:
0 commit comments