From 9f762e0201352ca83c8fea58d95eb70704407177 Mon Sep 17 00:00:00 2001 From: Leon Sixt Date: Mon, 20 Jan 2020 18:38:47 +0100 Subject: [PATCH 1/2] Only update mxts only once This bug resulted in an enormous run time, when using layers with multiple inputs. The layer was reset from all inputs layer. If you have two layers with two inputs you, the subsequent layers would gotten reset 4 times and this number grows exponentially. --- deeplift/layers/core.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deeplift/layers/core.py b/deeplift/layers/core.py index 5e0a57a..6c34621 100644 --- a/deeplift/layers/core.py +++ b/deeplift/layers/core.py @@ -69,7 +69,13 @@ def _initialize_mxts(self): def reset_mxts_updated(self): for output_layer in self._output_layers: - output_layer.reset_mxts_updated() + # only update layer if needed + # if output_layer was already called by another layer: + # output_layer._mxts_updated == False + # otherwise we call it + if output_layer._mxts_updated: + output_layer.reset_mxts_updated() + self._initialize_mxts() self._mxts_updated = False self._mxts_for_inputs_updated = False From 9159782d4b61a9adfce08556c45820705d9e2e91 Mon Sep 17 00:00:00 2001 From: berleon Date: Sun, 26 Jan 2020 13:02:08 +0100 Subject: [PATCH 2/2] set version to '0.6.10.0' --- deeplift.egg-info/PKG-INFO | 6 +++--- deeplift/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deeplift.egg-info/PKG-INFO b/deeplift.egg-info/PKG-INFO index 681c185..27ac4fb 100644 --- a/deeplift.egg-info/PKG-INFO +++ b/deeplift.egg-info/PKG-INFO @@ -1,13 +1,13 @@ Metadata-Version: 2.1 Name: deeplift -Version: 0.6.9.3 +Version: 0.6.10.0 Summary: DeepLIFT (Deep Learning Important FeaTures) Home-page: https://github.com/kundajelab/deeplift License: UNKNOWN Description: Algorithms for computing importance scores in deep neural networks. - + Implements the methods in "Learning Important Features Through Propagating Activation Differences" by Shrikumar, Greenside & Kundaje, as well as other commonly-used methods such as gradients, guided backprop and integrated gradients. See https://github.com/kundajelab/deeplift for documentation and FAQ. - + Platform: UNKNOWN Provides-Extra: tensorflow Provides-Extra: tensorflow with gpu diff --git a/deeplift/__init__.py b/deeplift/__init__.py index 520f9d8..647cd0e 100644 --- a/deeplift/__init__.py +++ b/deeplift/__init__.py @@ -1 +1 @@ -__version__ = '0.6.9.3' +__version__ = '0.6.10.0' diff --git a/setup.py b/setup.py index 39fceaa..e1247a8 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ Implements the methods in "Learning Important Features Through Propagating Activation Differences" by Shrikumar, Greenside & Kundaje, as well as other commonly-used methods such as gradients, guided backprop and integrated gradients. See https://github.com/kundajelab/deeplift for documentation and FAQ. """, url='https://github.com/kundajelab/deeplift', - version='0.6.9.3', + version='0.6.10.0', packages=['deeplift', 'deeplift.layers', 'deeplift.visualization', 'deeplift.conversion'],