code: def compute_Pool2d_memory(module, inp, out):
      assert isinstance(module, (nn.MaxPool2d, nn.AvgPool2d))
      assert len(inp.size()) == 4 and len(inp.size()) == len(out.size())
  
      mread = inp.numel()
      mwrite = out.numel()
  
      return mread * inp.element_size(), mwrite * out.element_size()
  
file_path: tensorwatch/tensorwatch/model_graph/torchstat/compute_memory.py
imports: import torch.nn
  import torch
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: compute_Pool2d_memory(module, inp, out) and returns: unknown,  unknown