class_docstr: The standard BN layer computes stats across all examples in a GPU. In some
  cases it is desirable to compute stats across only a subset of examples
  (e.g., in multigrid training https://arxiv.org/abs/1912.00998).
  SubBatchNorm3d splits the batch dimension into N splits, and run BN on
  each of them separately (so that the stats are computed on each subset of
  examples (1/N of batch) independently. During evaluation, it aggregates
  the stats from all splits into one BN.
class_docstr_tok: ["The","standard","BN","layer","computes","stats","across","all","examples","in","a","GPU",".","In","some","cases","it","is","desirable","to","compute","stats","across","only","a","subset","of","examples","(","e.g.",",","in","multigrid","training","https",":","\/\/arxiv.org\/abs\/1912.00998",")",".","SubBatchNorm3d","splits","the","batch","dimension","into","N","splits",",","and","run","BN","on","each","of","them","separately","(","so","that","the","stats","are","computed","on","each","subset","of","examples","(","1\/N","of","batch",")","independently",".","During","evaluation",",","it","aggregates","the","stats","from","all","splits","into","one","BN","."]
code: def forward(self, x):
      if self.training:
          n, c, t, h, w = x.shape
          x = x.view(n // self.num_splits, c * self.num_splits, t, h, w)
          x = self.split_bn(x)
          x = x.view(n, c, t, h, w)
      else:
          x = self.bn(x)
      if self.affine:
          x = x * self.weight.view((-1, 1, 1, 1))
          x = x + self.bias.view((-1, 1, 1, 1))
      return x
  
file_path: SlowFast/slowfast/models/batchnorm_helper.py
imports: from functools import partial
  import torch
  import torch.nn
  from pytorchvideo.layers.batch_norm import NaiveSyncBatchNorm1d, NaiveSyncBatchNorm3d
label_desc: Use image node_id 4 for calling the SubBatchNorm3d obj's underlying member method code with example usage: obj.forward(x) and returns: x