-
Hello! I have a question regarding the implementation of sagpool and the documentation provided for the sagpool. `attn = x if attn is None else attn if self.min_score is None: perm = topk(score, self.ratio, batch, self.min_score)` Here, the score values given to the topk pooling are after applying the non-linearity function. But, the documentation suggests the score before applying the non-linearity function. Documentation: y = GNN(X, A) Can anyone explain this? Thank you in advance for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
topk(y) and topk(tanh(y)) will return the same set of nodes, in other words applying tanh will not change the ranking. Because tanh is a increasing function i.e is if if y1>y2 then tanh(y1)>tanh(y2). |
Beta Was this translation helpful? Give feedback.
topk(y) and topk(tanh(y)) will return the same set of nodes, in other words applying tanh will not change the ranking. Because tanh is a increasing function i.e is if if y1>y2 then tanh(y1)>tanh(y2).