class_docstr: SqueezeNet implementation.
class_docstr_tok: ["SqueezeNet","implementation","."]
code: def __init__(
      self, requires_grad: bool = False, pretrained: bool = True
  ) -> None:
      super().__init__()
      pretrained_features = _get_net("squeezenet1_1", pretrained)
  
      self.N_slices = 7
      slices = []
      feature_ranges = [
          range(2),
          range(2, 5),
          range(5, 8),
          range(8, 10),
          range(10, 11),
          range(11, 12),
          range(12, 13),
      ]
      for feature_range in feature_ranges:
          seq = torch.nn.Sequential()
          for i in feature_range:
              seq.add_module(str(i), pretrained_features[i])
          slices.append(seq)
  
      self.slices = nn.ModuleList(slices)
      if not requires_grad:
          for param in self.parameters():
              param.requires_grad = False
  
imports: import inspect
  import os
  from typing import List, NamedTuple, Optional, Tuple, Union
  import torch
  from torch import Tensor, nn
  from typing_extensions import Literal
  from torchmetrics.utilities.imports import _TORCHVISION_AVAILABLE, _TORCHVISION_GREATER_EQUAL_0_13
label_desc: Use image node_id 1 to create a new SqueezeNet object from inherited base classes: torch.nn with example: obj = SqueezeNet(requires_grad, pretrained)