class_docstr: Convenience class for analyzers that revert the model's structure.
  
  This class contains many helper functions around the graph
  reverse function :func:`innvestigate.backend.graph.reverse_model`.
  
  The deriving classes should specify how the graph should be reverted
  by implementing the following functions:
  
  * :func:`_reverse_mapping(layer)` given a layer this function
    returns a reverse mapping for the layer as specified in
    :func:`innvestigate.backend.graph.reverse_model` or None.
  
    This function can be implemented, but it is encouraged to
    implement a default mapping and add additional changes with
    the function :func:`_add_conditional_reverse_mapping` (see below).
  
    The default behavior is finding a conditional mapping (see below),
    if none is found, :func:`_default_reverse_mapping` is applied.
  * :func:`_default_reverse_mapping` defines the default
    reverse mapping.
  * :func:`_head_mapping` defines how the outputs of the model
    should be instantiated before the are passed to the reversed
    network.
  
  Furthermore other parameters of the function
  :func:`innvestigate.backend.graph.reverse_model` can
  be changed by setting the according parameters of the
  init function:
  
  :param reverse_verbose: Print information on the reverse process.
  :param reverse_clip_values: Clip the values that are passed along
    the reverted network. Expects tuple (min, max).
  :param reverse_project_bottleneck_layers: Project the value range
    of bottleneck tensors in the reverse network into another range.
  :param reverse_check_min_max_values: Print the min/max values
    observed in each tensor along the reverse network whenever
    :func:`analyze` is called.
  :param reverse_check_finite: Check if values passed along the
    reverse network are finite.
  :param reverse_keep_tensors: Keeps the tensors created in the
    backward pass and stores them in the attribute
    :attr:`_reversed_tensors`.
  :param reverse_reapply_on_copied_layers: See
    :func:`innvestigate.backend.graph.reverse_model`.
docstr: From AnalyzerBase super init:
  * Initializes empty list of _model_checks
  
  From AnalyzerNetworkBase super init:
  * set _neuron_selection_mode
  * add check for lambda layers through 'allow_lambda_layers'
  * define attributes for '_prepare_model', which is later called
      through 'create_analyzer_model'
  
  Here:
  * define attributes required for calling '_conditional_reverse_mapping'
docstr_tok: ["From","AnalyzerBase","super","init",":","*","Initializes","empty","list","of","_model_checks","From","AnalyzerNetworkBase","super","init",":","*","set","_neuron_selection_mode","*","add","check","for","lambda","layers","through","'allow_lambda_layers'","*","define","attributes","for","'_prepare_model","'",",","which","is","later","called","through","'create_analyzer_model'","Here",":","*","define","attributes","required","for","calling","'_conditional_reverse_mapping","'"]
code: def __init__(
      self,
      model: Model,
      reverse_verbose: bool = False,
      reverse_clip_values: bool = False,
      reverse_project_bottleneck_layers: bool = False,
      reverse_check_min_max_values: bool = False,
      reverse_check_finite: bool = False,
      reverse_keep_tensors: bool = False,
      reverse_reapply_on_copied_layers: bool = False,
      **kwargs,
  ) -> None:
      """
      From AnalyzerBase super init:
      * Initializes empty list of _model_checks
  
      From AnalyzerNetworkBase super init:
      * set _neuron_selection_mode
      * add check for lambda layers through 'allow_lambda_layers'
      * define attributes for '_prepare_model', which is later called
          through 'create_analyzer_model'
  
      Here:
      * define attributes required for calling '_conditional_reverse_mapping'
      """
      super().__init__(model, **kwargs)
  
      self._reverse_verbose = reverse_verbose
      self._reverse_clip_values = reverse_clip_values
      self._reverse_project_bottleneck_layers = (
          reverse_project_bottleneck_layers
      )
      self._reverse_check_min_max_values = reverse_check_min_max_values
      self._reverse_check_finite = reverse_check_finite
      self._reverse_keep_tensors = reverse_keep_tensors
      self._reverse_reapply_on_copied_layers = (
          reverse_reapply_on_copied_layers
      )
      self._reverse_mapping_applied: bool = False
  
      # map priorities to lists of conditional reverse mappings
      self._conditional_reverse_mappings: dict[
          int, list[CondReverseMapping]
      ] = {}
  
      # Maps keys "min", "max", "finite", "keep" to tuples of indices
      self._debug_tensors_indices: dict[str, tuple[int, int]] = {}
  
imports: from __future__ import annotations
  from typing import Callable
  import numpy
  import tensorflow.keras.backend
  import innvestigate.backend
  import innvestigate.backend.graph
  import innvestigate.layers
  from innvestigate.analyzer.network_base import AnalyzerNetworkBase
  from innvestigate.backend.types import CondReverseMapping, Layer, Model, OptionalList, ReverseTensorDict, Tensor
label_desc: Use image node_id 1 to create a new ReverseAnalyzerBase object from inherited base classes: AnalyzerNetworkBase with example: obj = ReverseAnalyzerBase(model, reverse_verbose, reverse_clip_values, reverse_project_bottleneck_layers, reverse_check_min_max_values, reverse_check_finite, reverse_keep_tensors, reverse_reapply_on_copied_layers)