class_docstr: Models a perception module inference graph.
          Conditions on using the InferenceGraph object:
              1. All keys of the perception_blocks dictionary have to be unique
              2. All out_keys used when creating the blocks have to be unique
              3. All out_keys of a given block have to be sub-strings of the blocks key in the perception_blocks dict
  
  :param inference_block: An inference perception block to build the graph for.
class_docstr_tok: ["Models","a","perception","module","inference","graph",".","Conditions","on","using","the","InferenceGraph","object",":","1",".","All","keys","of","the","perception_blocks","dictionary","have","to","be","unique","2",".","All","out_keys","used","when","creating","the","blocks","have","to","be","unique","3",".","All","out_keys","of","a","given","block","have","to","be","sub-strings","of","the","blocks","key","in","the","perception_blocks","dict",":","param","inference_block",":","An","inference","perception","block","to","build","the","graph","for","."]
docstr: Calculates the total number of parameters in the model
  
  :return: The total number of parameters in the model
docstr_tok: ["Calculates","the","total","number","of","parameters","in","the","model",":","return",":","The","total","number","of","parameters","in","the","model"]
code: def _get_num_of_parameters(self) -> int:
      """Calculates the total number of parameters in the model
  
      :return: The total number of parameters in the model
      """
      return sum(
          pp.numel()
          for block in self.perception_blocks.values()
          for pp in block.parameters()
      )
  
imports: import os
  import pickle
  from typing import Union, List, Dict, Optional, Sequence, Tuple
  import networkx
  import torch
  from matplotlib import pyplot
  from torch import nn
  from maze.core.annotations import override
  from maze.perception.blocks.base import PerceptionBlock
label_desc: Use image node_id 5 for calling the InferenceGraph obj's underlying member method code with example usage: obj._get_num_of_parameters() and returns: sum