class_docstr: Interface for tensorflow models.
docstr: In every iteration yields a copy of the model with one additional layer's parameters randomized.
  For cascading randomization, set order (str) to 'top_down'. For independent randomization,
  set it to 'independent'. For bottom-up order, set it to 'bottom_up'.
  
  Parameters
  ----------
  order: string
      The various ways that a model's weights of a layer can be randomised.
  seed: integer
      The seed of the random layer generator.
  
  Returns
  -------
  layer.name, random_layer_model: string, torch.nn
      The layer name and the model.
docstr_tok: ["In","every","iteration","yields","a","copy","of","the","model","with","one","additional","layer","'s","parameters","randomized",".","For","cascading","randomization",",","set","order","(","str",")","to","'top_down","'",".","For","independent","randomization",",","set","it","to","'independent","'",".","For","bottom-up","order",",","set","it","to","'bottom_up","'",".","Parameters","--","--","--","--","--","order",":","string","The","various","ways","that","a","model","'s","weights","of","a","layer","can","be","randomised",".","seed",":","integer","The","seed","of","the","random","layer","generator",".","Returns","--","--","--","-","layer.name",",","random_layer_model",":","string",",","torch.nn","The","layer","name","and","the","model","."]
code: def get_random_layer_generator(
      self, order: str = "top_down", seed: int = 42
  ) -> Generator[Tuple[str, Model], None, None]:
      """
      In every iteration yields a copy of the model with one additional layer's parameters randomized.
      For cascading randomization, set order (str) to 'top_down'. For independent randomization,
      set it to 'independent'. For bottom-up order, set it to 'bottom_up'.
  
      Parameters
      ----------
      order: string
          The various ways that a model's weights of a layer can be randomised.
      seed: integer
          The seed of the random layer generator.
  
      Returns
      -------
      layer.name, random_layer_model: string, torch.nn
          The layer name and the model.
      """
      original_parameters = self.state_dict()
      random_layer_model = clone_model(self.model)
  
      layers = [
          _layer
          for _layer in random_layer_model.layers
          if len(_layer.get_weights()) > 0
      ]
  
      if order == "top_down":
          layers = layers[::-1]
  
      for layer in layers:
          if order == "independent":
              random_layer_model.set_weights(original_parameters)
          weights = layer.get_weights()
          np.random.seed(seed=seed + 1)
          layer.set_weights([np.random.permutation(w) for w in weights])
          yield layer.name, random_layer_model
  
imports: from __future__ import annotations
  from typing import Dict, Optional, Tuple, List, Union, Generator
  from keras.layers import Dense
  from keras import activations
  from keras import Model
  from keras.models import clone_model
  import numpy
  import tensorflow
  from warnings import warn
  from cachetools import cachedmethod, LRUCache
  import operator
  from quantus.helpers.model.model_interface import ModelInterface
  from quantus.helpers import utils
label_desc: Use image node_id 12 for calling the TensorFlowModel obj's underlying member method code with example usage: obj.get_random_layer_generator(order, seed) without return types