Closed fallahmad closed 4 years ago
I have the same problem. Have you fixed it?
Sorry I had no time to look into this yet. TF2 brings major changes and since DeepExplain uses some low level features the porting might not be straight-forward. Does it work if you disable tf2 features?
Definitely, DeepExplain does not support Eager Execution which can be disabled with
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
You can also try disabling v2 features entirely:
import tensorflow as tf
tf.compat.v1.disable_v2_behavior()
I encounter the same problem but due to different reason. For me when I tried to import tensorflow 2 and DeepExplain
import numpy as np import pandas as pd import tensorflow as tf from deepexplain.tensorflow import DeepExplain
and here is the error, seems like it is due to tensorflow_core was imported twice
KeyError: "Registering two gradient with name 'DeepExplainGrad'! (Previous registration was in register C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\framework\registry.py:66)"
I've tried tf.compat.v1.disable_eager_execution() tf.compat.v1.disable_v2_behavior() import tensorflow.compat.v1 as tf
none worked
sorry, I don't know why my code are flattened
Hi @John-Tsemin disabling Tensorflow 2 behavior with tf.compat.v1.disable_eager_execution() tf.compat.v1.disable_v2_behavior()
did not solve my problem, what i did to solve was to create another virtualenv with Tensorflow 1.15.0, indeed this version of Tensorflow has most of the functions of Tensorflow 2 and legacy Tensorflow 1, so I got DeepExplain working perfectly without changing a bit of my code. Hope that helps ;)
Just to check, was there any update on this? There still seems to be incompatibility with tf version 2 even if eager_execution or v2 behavior was disabled.
你好,来信已收到~~
Hello! thank you for this amazing package you created. We are currently encountering some problems of compatibility with tensorflow 2. Once we install the package, we cannot even import the library because:
`
AttributeError Traceback (most recent call last)