weihua916 / powerful-gnns

How Powerful are Graph Neural Networks?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dropout in last layer

foxtrotmike opened this issue · comments

Thank you for your work.
You have used dropout prior to computing the output from each layer. What is the role of this dropout?
See:

score_over_layer += F.dropout(self.linears_prediction[layer](pooled_h), self.final_dropout, training = self.training)

It's just a regularization.

Thank you for your response - Tome, it makes sense to regularize using dropout at layers before the last one. Dropout at the prediction output forces prediction scores of an example to become zero and also scales up the prediction scores of other examples in the batch. Please see: "Furthermore, the outputs are scaled by a factor of \frac{1}{1-p}" in https://pytorch.org/docs/stable/generated/torch.nn.Dropout.html
It would be great if you could help me understand this a bit better. Thanks, again.