gusye1234 / LightGCN-PyTorch

The PyTorch implementation of LightGCN
870 stars 229 forks source link

Implementation of BPR loss, softplus is different from logsigmoid #30

Closed shahjaidev closed 2 years ago

shahjaidev commented 2 years ago

As a follow up to the previously asked issue: https://github.com/gusye1234/LightGCN-PyTorch/issues/4

The paper uses logsigmoid in the loss function, but the code uses softplus. Why is this the case? These do not seem to be mathematically equivalent.

https://pytorch.org/docs/stable/generated/torch.nn.Softplus.html

https://pytorch.org/docs/stable/generated/torch.nn.LogSigmoid.html