tangjianpku / LINE

LINE: Large-scale information network embedding
1.05k stars 408 forks source link

On segmentation faults happening in the line.cpp Update method #25

Open benelot opened 6 years ago

benelot commented 6 years ago

With one of my network graphs, I had several segmentation faults occurring, which I could locate within the update method of LINE. The problem is that if the embeddings get very large in magnitude within some of the dimensions, the variables start to overflow and then the sigmoid method segfaults. I could mitigate the problem by setting "typedef double real;" instead of "typedef float real;" to use double precision instead of single precision. This resolved the segmentation faults, at least within my networks because of the enlarged variable space, however, when the embeddings are concatenated in the end, it again results in overflown embeddings. To solve the problem completely, it was necessary to write my own concatenate method. Just in case somebody runs into the same problems.

GamalC commented 6 years ago

This worked for me. Thanks!

kinkunchan commented 5 years ago

This worked for me! Thanks!

960924 commented 5 years ago

This worked for me! Thanks!

Hello, how did you solve it?

dsj96 commented 4 years ago

This worked for me. Thanks!