VGCN-PyTorch icon indicating copy to clipboard operation
VGCN-PyTorch copied to clipboard

About GCN layer

Open hannaljv opened this issue 3 years ago • 5 comments

Dear sir, Thank you for your wonderful work. I misunderstanding about how to calculate the output of the GCN layer, for example, "GraphConvolution(512, 256)". (In case I want to change the other input size). Can you explain it? Thank you.

hannaljv avatar Apr 26 '21 03:04 hannaljv

@hannaljv For the GCN layer, the input feature size is (batch size, node, input channel) and the output size is (batch size, node, output channel). GraphConvolution(input channel, output channel) only changes the feature channel dimension, the batch size and the number of nodes remain unchanged.

weizhou-geek avatar Apr 26 '21 22:04 weizhou-geek

@weizhou-geek thank you so much. I wonder that if I have nxn nodes (can be considered as a gray image (nxn)), n,n Affinity matrix, and each node is represented by 1 feature (a number), so can I feed it in GCN layer

hannaljv avatar Jun 26 '21 02:06 hannaljv

@weizhou-geek thank you so much. I wonder that if I have nxn nodes (can be considered as a gray image (nxn)), n,n Affinity matrix, and each node is represented by 1 feature (a number), so can I feed it in GCN layer

Yes, you can feed it into the GCN layer.

weizhou-geek avatar Jun 26 '21 04:06 weizhou-geek

I try to put it in form of (batch, node = nxn, feature = 1) (1) and (batch, node = n, feature = n) (2), but It seen doesn't work.

hannaljv avatar Jun 26 '21 06:06 hannaljv

I try to put it in form of (batch, node = nxn, feature = 1) (1) and (batch, node = n, feature = n) (2), but It seen doesn't work.

You may first refer to the adjacent matrix whose size should be (n \times n, n \times n).

weizhou-geek avatar Jul 01 '21 22:07 weizhou-geek