code: def compute_flops(module, inp, out):
      if isinstance(module, nn.Conv2d):
          return compute_Conv2d_flops(module, inp[0], out[0])
      elif isinstance(module, nn.BatchNorm2d):
          return compute_BatchNorm2d_flops(module, inp[0], out[0])
      elif isinstance(module, (nn.AvgPool2d, nn.MaxPool2d)):
          return compute_Pool2d_flops(module, inp[0], out[0])
      elif isinstance(
          module, (nn.AdaptiveAvgPool2d, nn.AdaptiveMaxPool2d)
      ):
          return compute_adaptivepool_flops(module, inp[0], out[0])
      elif isinstance(
          module, (nn.ReLU, nn.ReLU6, nn.PReLU, nn.ELU, nn.LeakyReLU)
      ):
          return compute_ReLU_flops(module, inp[0], out[0])
      elif isinstance(module, nn.Upsample):
          return compute_Upsample_flops(module, inp[0], out[0])
      elif isinstance(module, nn.Linear):
          return compute_Linear_flops(module, inp[0], out[0])
      else:
          # print(f"[Flops]: {type(module).__name__} is not supported!")
          return 0
      pass
  
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 1 for calling a global function with example usage: compute_flops(module, inp, out) and returns: compute_Conv2d_flops, compute_BatchNorm2d_flops, compute_Pool2d_flops, compute_adaptivepool_flops, compute_ReLU_flops, compute_Upsample_flops, compute_Linear_flops, int