class_docstr: Simulates multi-gpu behaviour of BatchNorm in one gpu by splitting.
  
  Implementation was adapted from:
  https://github.com/davidcpage/cifar10-fast/blob/master/torch_backend.py
  
  Attributes:
      num_features:
          Number of input features.
      num_splits:
          Number of splits.
docstr: Computes the SplitBatchNorm on the input.
docstr_tok: ["Computes","the","SplitBatchNorm","on","the","input","."]
code: def forward(self, input: Tensor) -> Tensor:
      """Computes the SplitBatchNorm on the input."""
      # get input shape
      N, C, H, W = input.shape
  
      # during training, use different stats for each split and otherwise
      # use the stats from the first split
      if self.training or not self.track_running_stats:
          result = nn.functional.batch_norm(
              input.view(-1, C * self.num_splits, H, W),
              self.running_mean,
              self.running_var,
              self.weight.repeat(self.num_splits),
              self.bias.repeat(self.num_splits),
              True,
              self.momentum,
              self.eps,
          ).view(N, C, H, W)
      else:
          # We have to ignore the type errors here, because we know that running_mean
          # and running_var are not None, but the type checker does not.
          result = nn.functional.batch_norm(
              input,
              self.running_mean[: self.num_features],  # type: ignore[index]
              self.running_var[: self.num_features],  # type: ignore[index]
              self.weight,
              self.bias,
              False,
              self.momentum,
              self.eps,
          )
  
      return result
  
file_path: lightly/lightly/models/batchnorm.py
imports: from __future__ import annotations
  from typing import Any
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 3 for calling the SplitBatchNorm obj's underlying member method code with example usage: obj.forward(input) and returns: result