Skip to content
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

Argument error in the LSTM example #2039

Open
ondrej-lukas opened this issue Jun 10, 2021 · 1 comment
Open

Argument error in the LSTM example #2039

ondrej-lukas opened this issue Jun 10, 2021 · 1 comment
Labels
awaiting feedback Indicates that further information is required from the issue creator deep explainer Relating to DeepExplainer, tensorflow or pytorch

Comments

@ondrej-lukas
Copy link

I attempted to run the example in with TF LSTM model . When attempting to compute the Shapley values I get the following error:
shap_values = explainer.shap_values(x_test[:10]) XXX\shap\explainers\_deep\__init__.py", line 124, in shap_values return self.explainer.shap_values(X, ranked_outputs, output_rank_order, check_additivity=check_additivity) XXX\shap\explainers\_deep\deep_tf.py", line 308, in shap_values sample_phis = self.run(self.phi_symbolic(feature_ind), self.model_inputs, joint_input) XXX\shap\explainers\_deep\deep_tf.py", line 365, in run return self.execute_with_overridden_gradients(anon) XXX\shap\explainers\_deep\deep_tf.py", line 401, in execute_with_overridden_gradients out = f() XXX\shap\explainers\_deep\deep_tf.py", line 358, in anon data = X[i].reshape(shape) TypeError: 'NoneType' object cannot be interpreted as an integer

Any idea how to fix this?
Thanks!

@CloseChoice CloseChoice added the deep explainer Relating to DeepExplainer, tensorflow or pytorch label Dec 8, 2023
@CloseChoice
Copy link
Collaborator

CloseChoice commented Dec 8, 2023

Sorry for the very late feedback and thanks a lot for the report. If this is still an issue for you, it would be great if you could provide a self-contained, reproducible example.

This is potentially related #3419

@CloseChoice CloseChoice added the awaiting feedback Indicates that further information is required from the issue creator label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Indicates that further information is required from the issue creator deep explainer Relating to DeepExplainer, tensorflow or pytorch
Projects
None yet
Development

No branches or pull requests

2 participants