class_docstr: Standalone Multiply-and-accumulate metric. Provides a lower bound of the
  computational cost of a model in a hardware-independent way by
  computing the number of multiplications. Currently supports only
  Linear or Conv2d modules. Other operations are ignored.
code: def update_compute_cost(self, module, dummy_input, output):
      modname = module.__class__.__name__
      if modname == "Linear":
          self._compute_cost += (
              dummy_input[0].shape[1] * output.shape[1]
          )
      elif modname == "Conv2d":
          (
              n,
              cout,
              hout,
              wout,
          ) = output.shape  # Batch, Channels, Height, Width
          ksize = module.kernel_size[0] * module.kernel_size[1]
          self._compute_cost += cout * hout * wout * ksize
  
imports: from torch.nn import Module
  from typing import List, Optional
  from torch import Tensor
  from avalanche.evaluation import Metric, PluginMetric, GenericPluginMetric
label_desc: Use image node_id 5 for calling the MAC obj's underlying member method code with example usage: obj.update_compute_cost(module, dummy_input, output) without return types