class_docstr: Vision transformer with locally-initializable self-attention layers
class_docstr_tok: ["Vision","transformer","with","locally-initializable","self-attention","layers"]
code: def _init_weights(self, m):
      if isinstance(m, nn.Linear):
          trunc_normal_(m.weight, std=0.02)
          if isinstance(m, nn.Linear) and m.bias is not None:
              nn.init.constant_(m.bias, 0)
      elif isinstance(m, nn.LayerNorm):
          nn.init.constant_(m.bias, 0)
          nn.init.constant_(m.weight, 1.0)
  
imports: import copy
  import logging
  import math
  import torch
  import torch.nn
  from vissl.models.model_helpers import DropPath, to_2tuple, trunc_normal_
  from vissl.models.trunks import register_model_trunk
  from vissl.utils.hydra_config import AttrDict
label_desc: Use image node_id 2 for calling the ConViT obj's underlying member method code with example usage: obj._init_weights(m) without return types