PetarV- / DGI

Deep Graph Infomax (https://arxiv.org/abs/1809.10341)
MIT License
630 stars 135 forks source link

sigmoid function is missing in layers/discriminator.py #6

Closed liangxun closed 5 years ago

liangxun commented 5 years ago

It seems that the sigmoid function is missing in layers/discriminator.py[line30]. Explained in your paper, the logistic sigmoid nonlinearity is used to convert scores into probabilities of (h_i, s) being a positive example.

PetarV- commented 5 years ago

Hello,

Thanks for your issue. The sigmoidal function is (implicitly) applied by the BCEWithLogitsLoss as used here: https://github.com/PetarV-/DGI/blob/master/execute.py#L60

Working with raw inputs allows for some numerical tricks to make the computation more stable.

Thanks, Petar