code: def compute_AvgPool2d_madd(module, inp, out):
      assert isinstance(module, nn.AvgPool2d)
      assert len(inp.size()) == 4 and len(inp.size()) == len(out.size())
  
      if isinstance(module.kernel_size, (tuple, list)):
          k_h, k_w = module.kernel_size
      else:
          k_h, k_w = module.kernel_size, module.kernel_size
      out_c, out_h, out_w = out.size()[1:]
  
      kernel_add = k_h * k_w - 1
      kernel_avg = 1
  
      return (kernel_add + kernel_avg) * (out_h * out_w) * out_c
  
file_path: tensorwatch/tensorwatch/model_graph/torchstat/compute_madd.py
imports: import torch.nn
label_desc: Use image node_id 5 for calling a global function with example usage: compute_AvgPool2d_madd(module, inp, out) and returns: unknown