code: def profile_fvcore(
      model,
      input_size=(3, 224, 224),
      input_dtype=torch.float32,
      max_depth=4,
      batch_size=1,
      detailed=False,
      force_cpu=False,
  ):
      if force_cpu:
          model = model.to("cpu")
      device, dtype = (
          next(model.parameters()).device,
          next(model.parameters()).dtype,
      )
      example_input = torch.zeros(
          (batch_size,) + input_size, device=device, dtype=input_dtype
      )
      fca = FlopCountAnalysis(model, example_input)
      aca = ActivationCountAnalysis(model, example_input)
      if detailed:
          print(flop_count_table(fca, max_depth=max_depth))
      return fca, fca.total(), aca, aca.total()
  
label_desc: Use image node_id 2 for calling a global function with example usage: profile_fvcore(model, input_size, input_dtype, max_depth, batch_size, detailed, force_cpu) and returns: fca,  fca,  aca,  aca