diff --git a/docs/source/conf.py b/docs/source/conf.py index 4a7763a3..5e53a5d9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -27,7 +27,6 @@ # The full version, including alpha/beta/rc tags release = "not set" - # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -59,7 +58,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/docs/source/index.rst b/docs/source/index.rst index 35c89bc5..b88dabcc 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -23,7 +23,6 @@ API reference modules/innvestigate modules/analyzer - modules/applications modules/tools modules/utils diff --git a/docs/source/modules/analyzer.rst b/docs/source/modules/analyzer.rst index ea89db56..b4c0a1b5 100644 --- a/docs/source/modules/analyzer.rst +++ b/docs/source/modules/analyzer.rst @@ -24,13 +24,6 @@ Layer-wise relevance propagation :undoc-members: -Pattern methods ---------------- - -.. automodule:: innvestigate.analyzer.pattern_based - :members: - :undoc-members: - Deep Taylor --------------- diff --git a/docs/source/modules/applications.rst b/docs/source/modules/applications.rst deleted file mode 100644 index a094190c..00000000 --- a/docs/source/modules/applications.rst +++ /dev/null @@ -1,10 +0,0 @@ -innvestigate.applications -========================= - -Imagenet ---------------- - -.. automodule:: innvestigate.applications.imagenet - :members: - :undoc-members: - diff --git a/docs/source/modules/tools.rst b/docs/source/modules/tools.rst index d2ee81d4..3c555892 100644 --- a/docs/source/modules/tools.rst +++ b/docs/source/modules/tools.rst @@ -1,13 +1,6 @@ innvestigate.tools ================== -Pattern Computation ---------------- - -.. automodule:: innvestigate.tools.pattern - :members: PatternComputer - :undoc-members: BasePattern - Perturbation Analysis --------------- diff --git a/docs/source/modules/utils.rst b/docs/source/modules/utils.rst index e5a38a30..7e9ec5c3 100644 --- a/docs/source/modules/utils.rst +++ b/docs/source/modules/utils.rst @@ -15,6 +15,6 @@ Visualizations Keras-Utils ------------ -.. automodule:: innvestigate.utils.keras.graph - :members: copy_layer, copy_layer_wo_act, model_wo_softmax, get_model_execution_graph, reverse_model +.. automodule:: innvestigate.backend.graph + :members: copy_layer, copy_layer_wo_activation, model_wo_softmax, get_model_execution_graph, reverse_model :undoc-members: diff --git a/src/innvestigate/backend/graph.py b/src/innvestigate/backend/graph.py index c8b6bed8..f81b3b0c 100644 --- a/src/innvestigate/backend/graph.py +++ b/src/innvestigate/backend/graph.py @@ -1000,6 +1000,7 @@ def reverse_model( """ Reverses a Keras model based on the given reverse functions. Returns two values: + 1. the reverted tensors for the according model inputs. 2. If `return_all_reversed_tensors` is true, a dictionary of all reversed tensors, otherwise None. @@ -1008,10 +1009,12 @@ def reverse_model( :param reverse_mappings: Either a callable that matches layers to mappings or a dictionary with layers as keys and mappings as values. Allowed as mapping forms are: + * A function of form (A) f(Xs, Ys, reversed_Ys, reverse_state). * A function of form f(B) f(layer, reverse_state) that returns a function of form (A). * A :class:`ReverseMappingBase` subclass. + :param default_reverse_mapping: A function that reverses layers for which no mapping was given by param "reverse_mappings". :param head_mapping: Map output tensors to new values before passing