Hello, a basic question, where does dropout work in the gcn model?

Hello, a basic question, where does dropout work in the gcn model?

code link

I know dropout is to prevent overfitting and break the connection between neurons with a certain probability. But where is the neurons in gcn, it seems that there is only W (weight) parameter.


As you can see here, dropout can be optionally applied on the input node features before transforming them with W.

got it!Thank you mufei.

mufei ,why the parameter ‘red’ and ‘msg’ in block_compute can be a function list?
is it right?

here is the link : code is in Class:GraphSageWithSampling

code link

Each element of red and msg stands for a separate reduce and message function. In this case multiple message-passing operations will be launched.

:+1::+1::+1::+1: Thank you so much!

hello, mufei, I have two large graphs, and the nodes between the two large graphs have interactions, (That is, the weights of edges in one graph are calculated based on the nodes of another graph.)and they both need to sample neighbor nodes.
In this case, it seems that I need to perform nodeflow operation on the two graphs separately. Do you have any suggestions?
Thank you! :pray:

And the two graphs are using different gnn model,for example,graph a uses gat,graph b uses rgcn.

I think the only thing you need to do is to perform nf.copy_to_parent to update the node features in graph 1. You can then use these node features to compute edge weights in graph 2. You will need to implement two models separately for nodeflow.

Also, please open a new discussion thread if you have a different question in the future.

ok,I will open a new discussion in the future.
do you mean that i need to create two NeighborSamplers for two graphs?
If so,i still don’t know how to make interactions between two nodeflow object.
could you please just give some simple code example or pipeline?

thank you!

I think you don’t need the interaction between two NodeFlow objects since you only need node representations in graph 1 for edge weighting in graph 2. Therefore, you just need to update the node representations in a nodeflow sampled from graph 1, copy the updated node representations back to graph 1 and then use the latest node representations in graph 1 for edge weighting in a nodeflow sampled from graph 2.

I will have a try.
Thank you for your kind helps! :+1: