uoguelph-mlrg / LDG

PyTorch code for "Learning Temporal Attention in Dynamic Graphs with Bilinear Interactions"
https://arxiv.org/abs/1909.10367
Other
98 stars 24 forks source link

Calculate About Conditional Intensity Function in DyRep #8

Closed icecity96 closed 3 years ago

icecity96 commented 3 years ago

I have a little confused about line 288-289 in dyrep.py:

 g_psi = torch.clamp(g / (psi + 1e-7), -75, 75)  # to prevent overflow
 Lambda = psi * (torch.log(1 + torch.exp(-g_psi)) + g_psi)

In the paper the formulate is:

image

Why we need add a - for g_psi in the exp() and add another term psi*g_psi