Skip to content
Discussion options

You must be logged in to vote

That was helpful, I have decided to go with torch.sum method however I am facing one issue, How to handle multiple output from graph model in to_captum function?

For example if my network looks like this:

class GCN(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = GCNConv(num_of_feats, output_dim)
      
    def forward(self, x, edge_index):
        x = F.relu(self.conv1(x, edge_index))
        return {'x'  : x, 
                'sum': torch.sum(x, 1)}

Since to_captum takes inputs and return single output, How to use this model with to_captum?

I found one solution, I tried but giving error. Please guide on this.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Comment options

You must be logged in to vote
3 replies
@rusty1s
Comment options

@monk1337
Comment options

@rusty1s
Comment options

Answer selected by monk1337
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