Skip to content
Discussion options

You must be logged in to vote

You can call the explainer similar to how you call the model, i.e.:

for i, sample in enumerate(loader):  # iterate over samples
        for data in sample:  # iterate over TCR sequences in each sample
                explanation = explainer(data.x, data.edge_index, ...)

Two things:

  • The explainer can not operate on data objects. You need to change your model forward function to expect Tensor attributes instead: def forward(self, data) -> def forward(self, x, edge_index, ...)
  • return_type should be log_probs in your case since the model does not seem to output probabilities (you have a sigmoid applied afterwards).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amoschoomy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants