class_docstr: Specific head for distilling iBOT (https://arxiv.org/pdf/2111.07832.pdf).
class_docstr_tok: ["Specific","head","for","distilling","iBOT","(","https",":","\/\/arxiv.org\/pdf\/2111.07832.pdf",")","."]
code: def _build_norm(norm: Optional[str], hidden_dim: int, **kwargs):
      if norm == "bn":
          norm = nn.BatchNorm1d(hidden_dim, **kwargs)
      elif norm == "syncbn":
          norm = nn.SyncBatchNorm(hidden_dim, **kwargs)
      elif norm == "ln":
          norm = nn.LayerNorm(hidden_dim, **kwargs)
      else:
          assert norm is None, "unknown norm type {}".format(norm)
      return norm
  
file_path: vissl/vissl/models/heads/ibot_distillation_head.py
imports: from typing import Optional
  import torch.nn
  from vissl.config import AttrDict
  from vissl.models.heads import register_model_head
  from vissl.models.heads.ibot_head import CustomSequential
  from vissl.models.model_helpers import trunc_normal_
label_desc: Use image node_id 3 for calling the IBOTDistillationHead obj's underlying member method code with example usage: obj._build_norm(norm, hidden_dim) and returns: norm