code: def __init__(
      self,
      num_classes: int = 1000,
      aux_logits: bool = True,
      transform_input: bool = False,
      inception_blocks: Optional[List[Callable[..., nn.Module]]] = None,
      init_weights: Optional[bool] = None,
      dropout: float = 0.5,
  ) -> None:
      super().__init__()
      _log_api_usage_once(self)
      if inception_blocks is None:
          inception_blocks = [
              BasicConv2d,
              InceptionA,
              InceptionB,
              InceptionC,
              InceptionD,
              InceptionE,
              InceptionAux,
          ]
      if init_weights is None:
          warnings.warn(
              "The default weight initialization of inception_v3 will be changed in future releases of "
              "torchvision. If you wish to keep the old behavior (which leads to long initialization times"
              " due to scipy/scipy#11299), please set init_weights=True.",
              FutureWarning,
          )
          init_weights = True
      if len(inception_blocks) != 7:
          raise ValueError(
              f"length of inception_blocks should be 7 instead of {len(inception_blocks)}"
          )
      conv_block = inception_blocks[0]
      inception_a = inception_blocks[1]
      inception_b = inception_blocks[2]
      inception_c = inception_blocks[3]
      inception_d = inception_blocks[4]
      inception_e = inception_blocks[5]
      inception_aux = inception_blocks[6]
  
      self.aux_logits = aux_logits
      self.transform_input = transform_input
      self.Conv2d_1a_3x3 = conv_block(3, 32, kernel_size=3, stride=2)
      self.Conv2d_2a_3x3 = conv_block(32, 32, kernel_size=3)
      self.Conv2d_2b_3x3 = conv_block(32, 64, kernel_size=3, padding=1)
      self.maxpool1 = nn.MaxPool2d(kernel_size=3, stride=2)
      self.Conv2d_3b_1x1 = conv_block(64, 80, kernel_size=1)
      self.Conv2d_4a_3x3 = conv_block(80, 192, kernel_size=3)
      self.maxpool2 = nn.MaxPool2d(kernel_size=3, stride=2)
      self.Mixed_5b = inception_a(192, pool_features=32)
      self.Mixed_5c = inception_a(256, pool_features=64)
      self.Mixed_5d = inception_a(288, pool_features=64)
      self.Mixed_6a = inception_b(288)
      self.Mixed_6b = inception_c(768, channels_7x7=128)
      self.Mixed_6c = inception_c(768, channels_7x7=160)
      self.Mixed_6d = inception_c(768, channels_7x7=160)
      self.Mixed_6e = inception_c(768, channels_7x7=192)
      self.AuxLogits: Optional[nn.Module] = None
      if aux_logits:
          self.AuxLogits = inception_aux(768, num_classes)
      self.Mixed_7a = inception_d(768)
      self.Mixed_7b = inception_e(1280)
      self.Mixed_7c = inception_e(2048)
      self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
      self.dropout = nn.Dropout(p=dropout)
      self.fc = nn.Linear(2048, num_classes)
      if init_weights:
          for m in self.modules():
              if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear):
                  stddev = float(m.stddev) if hasattr(m, "stddev") else 0.1  # type: ignore
                  torch.nn.init.trunc_normal_(
                      m.weight, mean=0.0, std=stddev, a=-2, b=2
                  )
              elif isinstance(m, nn.BatchNorm2d):
                  nn.init.constant_(m.weight, 1)
                  nn.init.constant_(m.bias, 0)
  
imports: import warnings
  from collections import namedtuple
  from functools import partial
  from typing import Any, Callable, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn, 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 Inception3 object from inherited base classes: nn with example: obj = Inception3(num_classes, aux_logits, transform_input, inception_blocks, init_weights, dropout)