lferry007 / LargeVis

Apache License 2.0
706 stars 167 forks source link

Segmentation fault #7

Open Nightrord opened 8 years ago

Nightrord commented 8 years ago

Running on my network, get following error.

Total vertices : 639 Dimension : 256 Normalizing ...... Done. Running ANNOY ...... Done. Running propagation 3/3 Test knn accuracy : 53.93% Computing similarities ...... Done. Fitting model Alpha: 0.905441 Progress: 9.456%Segmentation fault

Running it several times, and this is the best result. I don't know what cause the segmentation fault. Could you help me solve this?

Thanks in advance

qigangliu commented 8 years ago

i encounter the same issue, samples 14416, dimensions 369,but when running the example MNIST, it is OK, i guess this problem is caused by the special samples value, but i am not good at debugging c++ code, thanks for any help

DataWaveAnalytics commented 8 years ago

Please, could you post your input data? I can do some debugging of this. BTW you can do debugging using gdb

mglowacki100 commented 7 years ago

As far I remember, I have similar issue for MNIST when I've changed n_neihbours from 150 to 10.

Irene-GM commented 7 years ago

I get a similar issue with 46838 samples with 10 dimensions each. These samples are feature vectors normalized between 0 and 1, not similarities. When I run the algorithm with the default parameters, I get a Segmentation Fault:

screenshot from 2017-02-13 10-47-19

screenshot from 2017-02-13 10-46-36

So well, any idea on what could be happening here? I am running this algorithm in a Intel i7 8-core computer with 32gb of RAM, so I guess it is not a matter of lack of computing resources considering the size of my data. Please, could you kindly provide a description of what ANNOY does? Or perhaps to explain a bit more the phases this algorithm goes through? It could be helpful for debugging.

Thanks for your support! :-)

DataWaveAnalytics commented 7 years ago

@Irene-GM try running with GDB to see more details: gdb --args ./LargeVis -input features.csv ... Did you check if you have missing values in your data?

Also, have a look to the issue "Potential bug in LargeVis::search_reverse_thread". You should fix the method _sample_anedge as proposed by Sonja and recompile:

long long LargeVis::sample_an_edge(real rand_value1, real rand_value2){ long long k = (long long)(n_edge * rand_value1) - 1; k = max(k, 0); return rand_value2 <= prob[k] ? k : alias[k]; }

void4 commented 2 years ago

One reason why this can occur is forgetting to set the -output flag, which makes FOpen fail, which in turn makes fprintf fail image