code: def count_params(model):
      """Counts the total number of trainable parameters in a KG embedding model.
  
      Args:
        model: A tf.keras.Model KG embedding model.
  
      Returns:
        Integer representing the number of trainable variables.
      """
      total = 0
      for x in model.trainable_variables:
          total += np.prod(x.shape)
      return total
  
file_path: neural-structured-learning/research/kg_hyp_emb/utils/train.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import flags
  from kg_hyp_emb.config import CONFIG
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: count_params(model) and returns: total