class_docstr: An autograd function used to avoid storing activations for intermediate results.
  
  NOTE: Even though the mean and var are passed into this function, we do the entire
  backward, including mean and var, here. We have to calculate statistics outside
  this function in order to avoid multiple all_reduces when using checkpointing.
class_docstr_tok: ["An","autograd","function","used","to","avoid","storing","activations","for","intermediate","results",".","NOTE",":","Even","though","the","mean","and","var","are","passed","into","this","function",",","we","do","the","entire","backward",",","including","mean","and","var",",","here",".","We","have","to","calculate","statistics","outside","this","function","in","order","to","avoid","multiple","all_reduces","when","using","checkpointing","."]
code: def forward(
      ctx,
      input,
      weight,
      bias,
      affine,
      mean,
      invstd,
      total_count,
      process_group,
  ):
      ctx.save_for_backward(
          input, weight, bias, mean, invstd, total_count
      )
      ctx.process_group = process_group
  
      return _forward(input, affine, mean, invstd, weight, bias)
  
file_path: fairscale/fairscale/experimental/nn/sync_batchnorm.py
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
  from torch import Tensor
  import torch.distributed
  from torch.distributed import ProcessGroup
  from fairscale.internal import torch_version
  from fairscale.nn.checkpoint import is_checkpointing, is_recomputing
label_desc: Use image node_id 1 for calling the _SyncBatchNormFunction obj's underlying member method code with example usage: obj.forward(ctx, input, weight, bias, affine, mean, invstd, total_count, process_group) and returns: _forward