ConvNeXt Small model architecture from the `A ConvNet for the 2020s `_ paper. Args: weights (:class:`~torchvision.models.convnext.ConvNeXt_Small_Weights`, optional): The pretrained weights to use. See :class:`~torchvision.models.convnext
(
*, weights: Optional[ConvNeXt_Small_Weights] = None, progress: bool = True, **kwargs: Any
)
| 321 | @register_model() |
| 322 | @handle_legacy_interface(weights=("pretrained", ConvNeXt_Small_Weights.IMAGENET1K_V1)) |
| 323 | def convnext_small( |
| 324 | *, weights: Optional[ConvNeXt_Small_Weights] = None, progress: bool = True, **kwargs: Any |
| 325 | ) -> ConvNeXt: |
| 326 | """ConvNeXt Small model architecture from the |
| 327 | `A ConvNet for the 2020s <https://arxiv.org/abs/2201.03545>`_ paper. |
| 328 | |
| 329 | Args: |
| 330 | weights (:class:`~torchvision.models.convnext.ConvNeXt_Small_Weights`, optional): The pretrained |
| 331 | weights to use. See :class:`~torchvision.models.convnext.ConvNeXt_Small_Weights` |
| 332 | below for more details and possible values. By default, no pre-trained weights are used. |
| 333 | progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. |
| 334 | **kwargs: parameters passed to the ``torchvision.models.convnext.ConvNext`` |
| 335 | base class. Please refer to the `source code |
| 336 | <https://github.com/pytorch/vision/blob/main/torchvision/models/convnext.py>`_ |
| 337 | for more details about this class. |
| 338 | |
| 339 | .. autoclass:: torchvision.models.ConvNeXt_Small_Weights |
| 340 | :members: |
| 341 | """ |
| 342 | weights = ConvNeXt_Small_Weights.verify(weights) |
| 343 | |
| 344 | block_setting = [ |
| 345 | CNBlockConfig(96, 192, 3), |
| 346 | CNBlockConfig(192, 384, 3), |
| 347 | CNBlockConfig(384, 768, 27), |
| 348 | CNBlockConfig(768, None, 3), |
| 349 | ] |
| 350 | stochastic_depth_prob = kwargs.pop("stochastic_depth_prob", 0.4) |
| 351 | return _convnext(block_setting, stochastic_depth_prob, weights, progress, **kwargs) |
| 352 | |
| 353 | |
| 354 | @register_model() |
nothing calls this directly
no test coverage detected
searching dependent graphs…