himp-gnn icon indicating copy to clipboard operation
himp-gnn copied to clipboard

Difference of readout function in code vs. paper

Open Dinxin opened this issue 3 years ago • 1 comments

We noticed that the readout function in the original paper is concatenation, while the one in code implementation is addition.

Dinxin avatar Apr 10 '21 09:04 Dinxin

This is actually the same, but utilizing transformation and addition is a bit more memory-efficient:

x = self.lin(torch.cat([x1, x2], dim=-1))

is equal to

x = self.lin1(x1) + self.lin(x2)

rusty1s avatar Apr 12 '21 05:04 rusty1s