How to use DiffPool after sparse layers? #4392
-
I want to use DiffPool as a sort of global pooling, before readout, similar to SAGPool "global" variant (from the SAGPool paper). However, I get errors. My
I get an error:
If I uncomment
So can DiffPool be used after sparse layers? If so, how? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Note that you need to convert s = self.pooling_gnn(x, edge_index)
x, mask = to_dense_batch(x, batch)
s, _ = to_dense_batch(s, batch)
adj = to_dense_adj(edge_index, batch)
x, adj, link_pred_loss, entropy = dense_diff_pool(x, adj, s, mask) Let me know if this works :) |
Beta Was this translation helpful? Give feedback.
Note that you need to convert
x
ands
to a "dense batch" as well:Let me know if this works :)