New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault (core dumped) when training LMNN #3975
Comments
After playing a bit with this issue, I realized that there was a class that only appeared once in the dataset, thus it conflicted with the
|
I was able to make it work. The problem was related to the dataset, there weren't enough number of datapoints for certain classes so the |
@ealtamir great! although i think we should have the ticket open to fix it with an assertation error instead of a segmentation fault ;) |
Yes a graceful error is preferred.
@iglesias
On Wed, 6 Sep 2017 at 16:57, Viktor Gal ***@***.***> wrote:
@ealtamir <https://github.com/ealtamir> great! although i think we should
have the ticket open to fix it with an assertation error instead of a
segmentation fault ;)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3975 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAqqvx1WWMBr9NTgt7kjQfoMuEf4OIpjks5sfsDTgaJpZM4PNvw5>
.
--
Sent from my phone
|
@vinx13, since you have already touched LMNN and are at least a bit familiar with it, would you like to pick this one up? :-) |
sure, I will pick it up |
How is it going with this one, @vinx13? I wonder, no chase ;-) |
I have tried locally. When I set a K greater than num samples, the program crashed, which I think it is a issue related to KNN. However, I haven't reproduce the error above. |
Ill make this an entrance task:
|
Add input check and assertion in LMNN regarding k used in KNN and the number of examples per class.
Thanks a lot for reporting @ealtamir. The fix explains both issues (including the one with k=1). You were using a data set where one class had only 1 example, this is too few for the method's implementation. As an anecdote, I checked in the other public implementations of LMNN that I know of and they also have this "bug". At least now our implementation stops gracefully and points you at the error 😸 |
Add input check and assertion in LMNN regarding k used in KNN and the number of examples per class.
Add input check and assertion in LMNN regarding k used in KNN and the number of examples per class.
Add input check and assertion in LMNN regarding k used in KNN and the number of examples per class.
Hello,
I get a
Segmentation fault (core dumped)
when training an LMNN using Python. My features are of dimensions (695, 512) and classes (695,). I compiled Shogun in an Ubuntu LTS environment. The cmake command I used was:cmake -DPYTHON_INCLUDE_DIR=/home/enzo/art_rm/env/include/python3.5m -DPYTHON_EXECUTABLE:FILEPATH=/home/enzo/art_rm/env/bin/python3.5 -DPYTHON_PACKAGES_PATH=/home/enzo/art_rm/env/lib/python3.5/site-packages -DPythonModular=ON -DINTERFACE_PYTHON=ON -DBUILD_META_EXAMPLES=OFF -DBUNDLE_EIGEN=ON ..
I'm able to run the LMNN example shown in this notebook: https://nbviewer.jupyter.org/gist/iglesias/6576096. One important detail might be that I'm using
from shogun import LMNN
instead of
from modshogun import LMNN
which is what I've seen in every example. Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: