class_docstr: In the original MobileNetV2 implementation, this is InvertedResidual when expand ratio = 1.
  Residual connection is added if input and output shape are the same.
  
  References:
  
  - https://github.com/rwightman/pytorch-image-models/blob/b7cb8d03/timm/models/efficientnet_blocks.py#L90
  - https://github.com/google-research/google-research/blob/20736344/tunas/rematlib/mobile_model_v3.py#L433
  - https://github.com/ultmaster/AceNAS/blob/46c8895f/searchspace/proxylessnas/utils.py#L100
class_docstr_tok: ["In","the","original","MobileNetV2","implementation",",","this","is","InvertedResidual","when","expand","ratio","=","1",".","Residual","connection","is","added","if","input","and","output","shape","are","the","same",".","References",":","-","https",":","\/\/github.com\/rwightman\/pytorch-image-models\/blob\/b7cb8d03\/timm\/models\/efficientnet_blocks.py","#","L90","-","https",":","\/\/github.com\/google-research\/google-research\/blob\/20736344\/tunas\/rematlib\/mobile_model_v3.py","#","L433","-","https",":","\/\/github.com\/ultmaster\/AceNAS\/blob\/46c8895f\/searchspace\/proxylessnas\/utils.py","#","L100"]
code: def __init__(
      self,
      in_channels: MaybeIntChoice,
      out_channels: MaybeIntChoice,
      kernel_size: MaybeIntChoice = 3,
      stride: int = 1,
      squeeze_excite: Optional[
          Callable[[MaybeIntChoice, MaybeIntChoice], nn.Module]
      ] = None,
      norm_layer: Optional[Callable[[int], nn.Module]] = None,
      activation_layer: Optional[Callable[..., nn.Module]] = None,
  ) -> None:
      blocks = [
          # dw
          ConvBNReLU(
              in_channels,
              in_channels,
              stride=stride,
              kernel_size=kernel_size,
              groups=in_channels,
              norm_layer=norm_layer,
              activation_layer=activation_layer,
          ),
          # optional se
          squeeze_excite(in_channels, in_channels)
          if squeeze_excite
          else nn.Identity(),
          # pw-linear
          ConvBNReLU(
              in_channels,
              out_channels,
              kernel_size=1,
              norm_layer=norm_layer,
              activation_layer=nn.Identity,
          ),
      ]
      super().__init__(*simplify_sequential(blocks))
      # NOTE: "is" is used here instead of "==" to avoid creating a new value choice.
      self.has_skip = stride == 1 and in_channels is out_channels
  
imports: import math
  from typing import Optional, Callable, List, Tuple, Iterator, Union, cast, overload
  import torch
  from torch import nn
  from nni.mutable import MutableExpression
  from nni.nas.nn.pytorch import ModelSpace, LayerChoice, Repeat, MutableConv2d, MutableLinear, MutableBatchNorm2d
  from .utils.pretrained import load_pretrained_weight
label_desc: Use image node_id 1 to create a new DepthwiseSeparableConv object from inherited base classes: nn with example: obj = DepthwiseSeparableConv(in_channels, out_channels, kernel_size, stride, squeeze_excite, norm_layer, activation_layer)