code: def __init__(
      self,
      stages_repeats: List[int],
      stages_out_channels: List[int],
      num_classes: int = 1000,
      inverted_residual: Callable[..., nn.Module] = InvertedResidual,
  ) -> None:
      super().__init__()
      _log_api_usage_once(self)
  
      if len(stages_repeats) != 3:
          raise ValueError(
              "expected stages_repeats as list of 3 positive ints"
          )
      if len(stages_out_channels) != 5:
          raise ValueError(
              "expected stages_out_channels as list of 5 positive ints"
          )
      self._stage_out_channels = stages_out_channels
  
      input_channels = 3
      output_channels = self._stage_out_channels[0]
      self.conv1 = nn.Sequential(
          nn.Conv2d(
              input_channels, output_channels, 3, 2, 1, bias=False
          ),
          nn.BatchNorm2d(output_channels),
          nn.ReLU(inplace=True),
      )
      input_channels = output_channels
  
      self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1)
  
      # Static annotations for mypy
      self.stage2: nn.Sequential
      self.stage3: nn.Sequential
      self.stage4: nn.Sequential
      stage_names = [f"stage{i}" for i in [2, 3, 4]]
      for name, repeats, output_channels in zip(
          stage_names, stages_repeats, self._stage_out_channels[1:]
      ):
          seq = [inverted_residual(input_channels, output_channels, 2)]
          for i in range(repeats - 1):
              seq.append(
                  inverted_residual(output_channels, output_channels, 1)
              )
          setattr(self, name, nn.Sequential(*seq))
          input_channels = output_channels
  
      output_channels = self._stage_out_channels[-1]
      self.conv5 = nn.Sequential(
          nn.Conv2d(
              input_channels, output_channels, 1, 1, 0, bias=False
          ),
          nn.BatchNorm2d(output_channels),
          nn.ReLU(inplace=True),
      )
  
      self.fc = nn.Linear(output_channels, num_classes)
  
imports: from functools import partial
  from typing import Any, Callable, List, Optional
  import torch
  import torch.nn
  from torch import Tensor
  from ..transforms._presets import ImageClassification
  from ..utils import _log_api_usage_once
  from ._api import register_model, Weights, WeightsEnum
  from ._meta import _IMAGENET_CATEGORIES
  from ._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 1 to create a new ShuffleNetV2 object from inherited base classes: nn with example: obj = ShuffleNetV2(stages_repeats, stages_out_channels, num_classes, inverted_residual)