docstr: Returns number of non trainable parameters.
  
  Returns the number of parameters that are non trainable. If no trainable parameter exists we raise
  a `ValueError`.
docstr_tok: ["Returns","number","of","non","trainable","parameters",".","Returns","the","number","of","parameters","that","are","non","trainable",".","If","no","trainable","parameter","exists","we","raise","a","`","ValueError","`","."]
code: def _count_non_trainable(model: keras.Model) -> int:
      """Returns number of non trainable parameters.
  
      Returns the number of parameters that are non trainable. If no trainable parameter exists we raise
      a `ValueError`.
      """
  
      if len(model.trainable_weights) == 0:
          raise ValueError(
              "The model has no trainable weights. This method requires at least "
              "one trainable parameter to compute the gradients for. "
              "Set ``trainable=True`` on the model or a model weight."
          )
      return len(model.non_trainable_weights)
  
file_path: alibi/alibi/explainers/similarity/backends/tensorflow/base.py
imports: from typing import Any, Callable, List, Optional, Union
  import numpy
  import tensorflow
  from tensorflow import keras
label_desc: Use image node_id 7 for calling the _TensorFlowBackend obj's underlying member method code with example usage: obj._count_non_trainable(model) and returns: len