class_docstr: Base ModelInterface for torch and tensorflow models.
class_docstr_tok: ["Base","ModelInterface","for","torch","and","tensorflow","models","."]
docstr: Count number of randomisable layers for `Model Parameter Randomisation`.
  This property is needed to avoid `len(model.get_random_layer_generator())`,
  because meterializing bigger models `num_layers` times in memory at ones
  has shown to cause OOM errors.
  
  Returns
  -------
  n:
      Number of layers in model, which can be randomised.
docstr_tok: ["Count","number","of","randomisable","layers","for","`","Model","Parameter","Randomisation","`",".","This","property","is","needed","to","avoid","`","len","(","model.get_random_layer_generator","(",")",")","`",",","because","meterializing","bigger","models","`","num_layers","`","times","in","memory","at","ones","has","shown","to","cause","OOM","errors",".","Returns","--","--","--","-","n",":","Number","of","layers","in","model",",","which","can","be","randomised","."]
code: def random_layer_generator_length(self) -> int:
      """
      Count number of randomisable layers for `Model Parameter Randomisation`.
      This property is needed to avoid `len(model.get_random_layer_generator())`,
      because meterializing bigger models `num_layers` times in memory at ones
      has shown to cause OOM errors.
  
      Returns
      -------
      n:
          Number of layers in model, which can be randomised.
      """
      raise NotImplementedError
  
file_path: Quantus/quantus/helpers/model/model_interface.py
imports: import warnings
  from importlib import util
  from abc import ABC, abstractmethod
  from typing import Any, Dict, Optional, Tuple, List, Union, Generator, TypeVar, Generic
  import numpy
label_desc: Use image node_id 10 for calling the ModelInterface obj's underlying member method code with example usage: obj.random_layer_generator_length() without return types