class_docstr: MobileNetV2 backbone.
  
  Args:
      widen_factor (float): Width multiplier, multiply number of
          channels in each layer by this amount. Default: 1.0.
      strides (Sequence[int], optional): Strides of the first block of each
          layer. If not specified, default config in ``arch_setting`` will
          be used.
      dilations (Sequence[int]): Dilation of each layer.
      out_indices (None or Sequence[int]): Output from which stages.
          Default: (7, ).
      frozen_stages (int): Stages to be frozen (all param fixed).
          Default: -1, which means not freezing any parameters.
      conv_cfg (dict): Config dict for convolution layer.
          Default: None, which means using conv2d.
      norm_cfg (dict): Config dict for normalization layer.
          Default: dict(type='BN').
      act_cfg (dict): Config dict for activation layer.
          Default: dict(type='ReLU6').
      norm_eval (bool): Whether to set norm layers to eval mode, namely,
          freeze running stats (mean and var). Note: Effect on Batch Norm
          and its variants only. Default: False.
      with_cp (bool): Use checkpoint or not. Using checkpoint will save some
          memory while slowing down the training speed. Default: False.
class_docstr_tok: ["MobileNetV2","backbone",".","Args",":","widen_factor","(","float",")",":","Width","multiplier",",","multiply","number","of","channels","in","each","layer","by","this","amount",".","Default",":","1.0.","strides","(","Sequence","[","int","]",",","optional",")",":","Strides","of","the","first","block","of","each","layer",".","If","not","specified",",","default","config","in","``","arch_setting","``","will","be","used",".","dilations","(","Sequence","[","int","]",")",":","Dilation","of","each","layer",".","out_indices","(","None","or","Sequence","[","int","]",")",":","Output","from","which","stages",".","Default",":","(","7",",",")",".","frozen_stages","(","int",")",":","Stages","to","be","frozen","(","all","param","fixed",")",".","Default",":","-1",",","which","means","not","freezing","any","parameters",".","conv_cfg","(","dict",")",":","Config","dict","for","convolution","layer",".","Default",":","None",",","which","means","using","conv2d",".","norm_cfg","(","dict",")",":","Config","dict","for","normalization","layer",".","Default",":","dict","(","type='BN","'",")",".","act_cfg","(","dict",")",":","Config","dict","for","activation","layer",".","Default",":","dict","(","type='ReLU6","'",")",".","norm_eval","(","bool",")",":","Whether","to","set","norm","layers","to","eval","mode",",","namely",",","freeze","running","stats","(","mean","and","var",")",".","Note",":","Effect","on","Batch","Norm","and","its","variants","only",".","Default",":","False",".","with_cp","(","bool",")",":","Use","checkpoint","or","not",".","Using","checkpoint","will","save","some","memory","while","slowing","down","the","training","speed",".","Default",":","False","."]
code: def forward(self, x):
      x = self.conv1(x)
  
      outs = []
      for i, layer_name in enumerate(self.layers):
          layer = getattr(self, layer_name)
          x = layer(x)
          if i in self.out_indices:
              outs.append(x)
  
      if len(outs) == 1:
          return outs[0]
      else:
          return tuple(outs)
  
file_path: lavis/lavis/common/annotator/uniformer/mmseg/models/backbones/mobilenet_v2.py
imports: import logging
  import torch.nn
  from annotator.uniformer.mmcv.cnn import ConvModule, constant_init, kaiming_init
  from annotator.uniformer.mmcv.runner import load_checkpoint
  from torch.nn.modules.batchnorm import _BatchNorm
  from ..builder import BACKBONES
  from ..utils import InvertedResidual, make_divisible
label_desc: Use image node_id 4 for calling the MobileNetV2 obj's underlying member method code with example usage: obj.forward(x) and returns: outs, tuple