class_docstr: BatchNorm2d where the batch statistics and the affine parameters are
  fixed.
  
  It contains non-trainable buffers called
  "weight" and "bias", "running_mean", "running_var",
  initialized to perform identity transformation.
  Args:
     num_features (int):  :math:`C` from an expected input of size
          :math:`(N, C, H, W)`.
     eps (float): a value added to the denominator for numerical stability.
          Default: 1e-5
class_docstr_tok: ["BatchNorm2d","where","the","batch","statistics","and","the","affine","parameters","are","fixed",".","It","contains","non-trainable","buffers","called","''","weight","''","and","``","bias","''",",","``","running_mean","''",",","``","running_var","''",",","initialized","to","perform","identity","transformation",".","Args",":","num_features","(","int",")",":",":","math",":","`","C","`","from","an","expected","input","of","size",":","math",":","`","(","N",",","C",",","H",",","W",")","`",".","eps","(","float",")",":","a","value","added","to","the","denominator","for","numerical","stability",".","Default",":","1e-5"]
docstr: Convert all BatchNorm/SyncBatchNorm in module into FrozenBatchNorm.
  
  Args:
      module (torch.nn.Module):
  Returns:
      If module is BatchNorm/SyncBatchNorm, returns a new module.
      Otherwise, in-place convert module and return it.
  Similar to convert_sync_batchnorm in
  https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/batchnorm.py
docstr_tok: ["Convert","all","BatchNorm\/SyncBatchNorm","in","module","into","FrozenBatchNorm",".","Args",":","module","(","torch.nn.Module",")",":","Returns",":","If","module","is","BatchNorm\/SyncBatchNorm",",","returns","a","new","module",".","Otherwise",",","in-place","convert","module","and","return","it",".","Similar","to","convert_sync_batchnorm","in","https",":","\/\/github.com\/pytorch\/pytorch\/blob\/master\/torch\/nn\/modules\/batchnorm.py"]
code: def convert_frozen_batchnorm(cls, module):
      """Convert all BatchNorm/SyncBatchNorm in module into FrozenBatchNorm.
  
      Args:
          module (torch.nn.Module):
      Returns:
          If module is BatchNorm/SyncBatchNorm, returns a new module.
          Otherwise, in-place convert module and return it.
      Similar to convert_sync_batchnorm in
      https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/batchnorm.py
      """
      bn_module = nn.modules.batchnorm
      bn_module = (bn_module.BatchNorm2d, bn_module.SyncBatchNorm)
      res = module
      if isinstance(module, bn_module):
          res = cls(module.num_features)
          if module.affine:
              res.weight.data = module.weight.data.clone().detach()
              res.bias.data = module.bias.data.clone().detach()
          res.running_mean.data = module.running_mean.data
          res.running_var.data = module.running_var.data
          res.eps = module.eps
      else:
          for name, child in module.named_children():
              new_child = cls.convert_frozen_batchnorm(child)
              if new_child is not child:
                  res.add_module(name, new_child)
      return res
  
file_path: mmdetection/mmdet/models/layers/brick_wrappers.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from mmcv.cnn.bricks.wrappers import NewEmptyTensorOp, obsolete_torch_version
  from mmdet.registry import MODELS
label_desc: Use image node_id 4 for calling the FrozenBatchNorm2d obj's underlying member method code with example usage: obj.convert_frozen_batchnorm(cls, module) and returns: res