code: def compute_activations(
      model: nn.Module,
      input_shape: Tuple[int] = (3, 224, 224),
      input_key: Optional[Union[str, List[str]]] = None,
  ) -> int:
      """
      Compute the number of activations created in a forward pass.
      """
      return compute_complexity(
          model,
          _layer_activations,
          input_shape,
          input_key,
          patch_attr="activations",
      )
  
imports: import collections.abc
  import logging
  import operator
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from classy_vision.generic.util import eval_model, get_batchsize_per_replica, get_model_dummy_input, is_leaf, is_on_gpu
  from torch.cuda import cudart
label_desc: Use image node_id 11 for calling a global function with example usage: compute_activations(model, input_shape, input_key) and returns: compute_complexity