pygcn icon indicating copy to clipboard operation
pygcn copied to clipboard

How to implement residual connections in gcn?

Open ray075hl opened this issue 5 years ago • 2 comments

Hi @tkipf . I have some confusion about residual connection in GCN.

def forward(self, x, adj):
        # x size: [2708, 1433]
        # adj size: [2708, 2708]
        x = F.relu(self.gc1(x, adj))   # [2708, 16]
        ......

input size: [2708, 1433] , but first layer output's size is [2708, 16]

image If I implement residual like equation above.

x = F.relu(self.gc1(x, adj))  + x   

Error! size miss match.

ray075hl avatar May 24 '19 03:05 ray075hl

the output of layer 'self.gc1()' is [*,16] what ever the input is

wutaiqiang avatar Feb 11 '20 06:02 wutaiqiang

@wutaiqiang so, how to implement residual connection, when inputs feature dimension[, 1433] not equal to self.gc1() output size [, 16] ?

ray075hl avatar Feb 12 '20 03:02 ray075hl