class_docstr: This class implements the `MobileViT architecture <https://arxiv.org/abs/2110.02178?context=cs.LG>`_
class_docstr_tok: ["This","class","implements","the","`","MobileViT","architecture","<","https",":","\/\/arxiv.org\/abs\/2110.02178","?","context=cs.LG",">","`","_"]
code: def init_parameters(m):
      if isinstance(m, nn.Conv2d):
          if m.weight is not None:
              nn.init.kaiming_normal_(m.weight, mode="fan_out")
          if m.bias is not None:
              nn.init.zeros_(m.bias)
      elif isinstance(m, (nn.LayerNorm, nn.BatchNorm2d)):
          if m.weight is not None:
              nn.init.ones_(m.weight)
          if m.bias is not None:
              nn.init.zeros_(m.bias)
      elif isinstance(m, (nn.Linear,)):
          if m.weight is not None:
              nn.init.trunc_normal_(m.weight, mean=0.0, std=0.02)
          if m.bias is not None:
              nn.init.zeros_(m.bias)
      else:
          pass
  
imports: from typing import Optional, Tuple, Union, Dict
  import math
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn import functional
  from transformer import TransformerEncoder
  from model_config import get_config
label_desc: Use image node_id 5 for calling the MobileViT obj's underlying member method code with example usage: obj.init_parameters(m) without return types