TypeError: Tensor is unhashable. Instead, use tensor.ref() as the key. in Keras Surgeon
I have solved a similar problem when I try the Deep learning example with GradientExplainer. This is caused by version incompatibility.
Adding the code below may be helpful:
import tensorflow.compat.v1.keras.backend as K
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
tf version is 2.3.1
kerase version is 2.4.0
Shap version is 0.36