-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. #284
Comments
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 In the meantime, I'll make the current requirement of using |
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
The text was updated successfully, but these errors were encountered: