code: def compute_Upsample_flops(module, inp, out):
      assert isinstance(module, nn.Upsample)
      output_size = out[0]
      batch_size = inp.size()[0]
      output_elements_count = batch_size
      for s in output_size.shape[1:]:
          output_elements_count *= s
  
      return output_elements_count
  
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 8 for calling a global function with example usage: compute_Upsample_flops(module, inp, out) and returns: output_elements_count