Closed picciama closed 1 year ago
Hi @picciama,
thanks for your interest in the package and the thorough issue.
The original iNNvestigate 1.0 was written on top of TF1 and Keras (among other backends) and works by inverting the computational tree of the model to create an analyzer. To ensure compatibility with existing code and to have identical outputs between iNNvestigate 1 and 2, we've kept this graph-based approach.
I will open a separate issue with your feature request to support GradientTape
. Contributions are more than welcome and this issue might just take a little tweak to this function.
In the meantime, I'll make the current requirement of using tf.compat.v1.disable_eager_execution()
more obvious in the readme.
Tracked in #285.
Read the docs
Done. It isn't documented behaviour.
Describe the bug
The error message in title is returned when trying to analyze a
tf.keras.Model
usinganalyzer.analyze
using tensorflow 2.Steps to reproduce the bug
Expected behavior
The analyzer shouldn't throw an error. It should work, since v2.0.0 is supposed to work with tensorflow >= 2 which is eagerly executed. Therefore, the analyzer should make use of
tf.GradientTape
Error Output
Platform information