I’m getting an error in this notebook. In the section “Visualizing Shap Values” in the line
shap_values = e.shap_values(x_test_each_class) it says:

tf.keras.backend.set_learning_phase is deprecated and will be removed after 2020-10-11. To update it, simply pass a True/False value to the training argument of the __call__ method of your layer or model.

Thanks in advance,

hi @Matias_Saez , does that warning message stop your notebook? I think you can skip that message and go ahead with the next step to see the visualization.

( I noticed the notebook will get error with new default Tensorflow 2.6.0 of Colab. If it is the case, you can try to install !pip install tensorflow==2.5.0 together with installation of shap and run the notebook again. )

Hope it helps,

Thank you for your answer Cuong, i did that, just went ahead but a few steps later i got another error and couldn´t continue.
i´ll try installing tf version 2.5.0 and see how it goes…

I installed tf 2.5 and and could run all the steps of the notebook.
that was the issue!
Thank you Cuong!

Glad it helps! :slight_smile: Keep learning! :beers:
(The issue is reported to the staff. Hope the notebook will get an update soon.)

1 Like