hiranumn / IntegratedGradients

Python/Keras implementation of integrated gradients presented in "Axiomatic Attribution for Deep Networks" for explaining any model defined in Keras framework.
MIT License
216 stars 51 forks source link

AttributeError: 'int' object has no attribute 'op' #14

Open senjed opened 3 years ago

senjed commented 3 years ago

I tried to run the example you provided with iris dataset with keras. But I am getting AttributeError: 'int' object has no attribute 'op' error. My TensorFlow version is 2.2. The error is occurring in the below line:

 #Build a computational graph that computes the tensors given inputs
self.get_gradients[c] = K.function(inputs=self.input_tensors, outputs=gradients)
ZZN0508 commented 2 years ago

Hello, I have the same problem, can you solve it?

hiranumn commented 2 years ago

Unfortunately, this repo was built 4 years ago for TensorFlow v1 and it has never been updated for v2 ever since. I would recommend that you find another package or implement this on your own as this is not a complicated algorithm.

Cheers.