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

xs and ys are required to have the same length #48

Open
schulter opened this issue Sep 26, 2019 · 1 comment
Open

xs and ys are required to have the same length #48

schulter opened this issue Sep 26, 2019 · 1 comment

Comments

@schulter
Copy link

Hi,
It seems that xs and ys are required to have the same length according to _check_input_compatibility() in methods.py.
Do you know why that is the case? I try to run deepExplain for a graph convolutional network where the adjacency matrix of the graph is passed as additional input (so the model has multiple inputs) but it performs a simple binary classification task.
Therefore, I thought ys has shape (batch x 1) and xs is quite independent of that and has different inputs.

I ran the method in the past using masking of the target T but now wanted to switch to the explainer API since I have to run it for a lot of different data points.
As far as I understood, the input placeholders have to remain the same in order to re-use the same computational graph.

Can I therefore just remove the check that requires the length of xs and ys to be the same? Why is that required in the first place?

Thank you and best,
Roman

@marcoancona
Copy link
Owner

Hello,
That check is intended to verify that the batch size is the same. If you have multiple inputs than the len() does not verify the batch size indeed, but rather the number of inputs. So this is a problem in the code, yes. You can try removing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants