class_docstr: Inception Resnet V1 model with optional loading of pretrained weights.
  
  Model parameters can be loaded based on pretraining on the VGGFace2 or CASIA-Webface
  datasets. Pretrained state_dicts are automatically downloaded on model instantiation if
  requested and cached in the torch cache. Subsequent instantiations use the cache rather than
  redownloading.
  
  Keyword Arguments:
      pretrained {str} -- Optional pretraining dataset. Either 'vggface2' or 'casia-webface'.
          (default: {None})
      classify {bool} -- Whether the model should output classification probabilities or feature
          embeddings. (default: {False})
      num_classes {int} -- Number of output classes. If 'pretrained' is set and num_classes not
          equal to that used for the pretrained model, the final linear layer will be randomly
          initialized. (default: {None})
      dropout_prob {float} -- Dropout probability. (default: {0.6})
code: def __init__(
      self,
      pretrained=None,
      classify=False,
      num_classes=None,
      dropout_prob=0.6,
      device=None,
  ):
      super().__init__()
  
      # Set simple attributes
      self.pretrained = pretrained
      self.classify = classify
      self.num_classes = num_classes
  
      if pretrained == "vggface2":
          tmp_classes = 8631
      elif pretrained == "casia-webface":
          tmp_classes = 10575
      elif (
          pretrained is None
          and self.classify
          and self.num_classes is None
      ):
          raise Exception(
              'If "pretrained" is not specified and "classify" is True, "num_classes" must be specified'
          )
  
      # Define layers
      self.conv2d_1a = BasicConv2d(3, 32, kernel_size=3, stride=2)
      self.conv2d_2a = BasicConv2d(32, 32, kernel_size=3, stride=1)
      self.conv2d_2b = BasicConv2d(
          32, 64, kernel_size=3, stride=1, padding=1
      )
      self.maxpool_3a = nn.MaxPool2d(3, stride=2)
      self.conv2d_3b = BasicConv2d(64, 80, kernel_size=1, stride=1)
      self.conv2d_4a = BasicConv2d(80, 192, kernel_size=3, stride=1)
      self.conv2d_4b = BasicConv2d(192, 256, kernel_size=3, stride=2)
      self.repeat_1 = nn.Sequential(
          Block35(scale=0.17),
          Block35(scale=0.17),
          Block35(scale=0.17),
          Block35(scale=0.17),
          Block35(scale=0.17),
      )
      self.mixed_6a = Mixed_6a()
      self.repeat_2 = nn.Sequential(
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
          Block17(scale=0.10),
      )
      self.mixed_7a = Mixed_7a()
      self.repeat_3 = nn.Sequential(
          Block8(scale=0.20),
          Block8(scale=0.20),
          Block8(scale=0.20),
          Block8(scale=0.20),
          Block8(scale=0.20),
      )
      self.block8 = Block8(noReLU=True)
      self.avgpool_1a = nn.AdaptiveAvgPool2d(1)
      self.dropout = nn.Dropout(dropout_prob)
      self.last_linear = nn.Linear(1792, 512, bias=False)
      self.last_bn = nn.BatchNorm1d(
          512, eps=0.001, momentum=0.1, affine=True
      )
  
      if pretrained is not None:
          self.logits = nn.Linear(512, tmp_classes)
          load_weights(self, pretrained)
  
      if self.classify and self.num_classes is not None:
          self.logits = nn.Linear(512, self.num_classes)
  
      self.device = torch.device("cpu")
      if device is not None:
          self.device = device
          self.to(device)
  
imports: import os
  import requests
  from requests.adapters import HTTPAdapter
  import torch
  from torch import nn
  from torch.nn import functional
  from .utils.download import download_url_to_file
label_desc: Use image node_id 1 to create a new InceptionResnetV1 object from inherited base classes: nn with example: obj = InceptionResnetV1(pretrained, classify, num_classes, dropout_prob, device)