code: def compute_Pool2d_flops(module, input, out):
      batch_size = input.size(0)
      input_planes = input.size(1)
      input_height = input.size(2)
      input_width = input.size(3)
      kernel_size = (
          ("int" in str(type(module.kernel_size)))
          and [module.kernel_size, module.kernel_size]
          or module.kernel_size
      )
      kernel_ops = kernel_size[0] * kernel_size[1]
      stride = (
          ("int" in str(type(module.stride)))
          and [module.stride, module.stride]
          or module.stride
      )
      padding = (
          ("int" in str(type(module.padding)))
          and [module.padding, module.padding]
          or module.padding
      )
  
      output_width = math.floor(
          (input_width + 2 * padding[0] - kernel_size[0])
          / float(stride[0])
          + 1
      )
      output_height = math.floor(
          (input_height + 2 * padding[1] - kernel_size[1])
          / float(stride[0])
          + 1
      )
      return (
          batch_size
          * input_planes
          * output_width
          * output_height
          * kernel_ops
      )
  
file_path: tensorwatch/tensorwatch/model_graph/torchstat/compute_flops.py
imports: import torch.nn
  import torch
  import numpy
  import math
label_desc: Use image node_id 6 for calling a global function with example usage: compute_Pool2d_flops(module, input, out) and returns: unknown