I managed to get the library compiled and ran the hello_ml example successfully now :) I tried to get one step further by modifying the code so it fits my problem better. However I wasn't able to run it without crashing. Basically I only removed everything other than neural network (compiled and ran fine). Then I changed the data fields (no continuous ones, only specified; only one label). I proceded to fill the feat and lab variables (all set to 0 for starters). I chanced the test_features to 10 and predicted_labels to 1.
However, when I try to run it I get this:
Floating point exception (core dumped)
Hooking into it with db and getting a backtrace results in this:
Program received signal SIGFPE, Arithmetic exception.
0x0000000000498c3e in GClasses::GNeuralNet::trainWithValidation (this=0x845c80, trainFeatures=..., trainLabels=..., validateFeatures=..., validateLabels=...) at GNeuralNet.cpp:573
573 if(1.0 - dSumSquaredError / dBestError >= m_minImprovement) // This condition is designed such that if dSumSquaredError is NAN, it will break out of the loop
(gdb) bt
#0 0x0000000000498c3e in GClasses::GNeuralNet::trainWithValidation (this=0x845c80, trainFeatures=..., trainLabels=..., validateFeatures=..., validateLabels=...) at GNeuralNet.cpp:573
#1 0x0000000000498356 in GClasses::GNeuralNet::trainInner (this=0x845c80, features=..., labels=...) at GNeuralNet.cpp:503
#2 0x0000000000430d14 in GClasses::GSupervisedLearner::train (this=0x845c80, features=..., labels=...) at GLearner.cpp:484
#3 0x0000000000435ed4 in GClasses::GLabelFilter::trainInner (this=0x8463a0, features=..., labels=...) at GLearner.cpp:1287
#4 0x0000000000430d14 in GClasses::GSupervisedLearner::train (this=0x8463a0, features=..., labels=...) at GLearner.cpp:484
#5 0x0000000000435701 in GClasses::GFeatureFilter::trainInner (this=0x846460, features=..., labels=...) at GLearner.cpp:1192
#6 0x0000000000430d14 in GClasses::GSupervisedLearner::train (this=0x846460, features=..., labels=...) at GLearner.cpp:484
#7 0x0000000000437676 in GClasses::GAutoFilter::trainInner (this=0x7fffffffdca0, features=..., labels=...) at GLearner.cpp:1573
#8 0x0000000000430d14 in GClasses::GSupervisedLearner::train (this=0x7fffffffdca0, features=..., labels=...) at GLearner.cpp:484
#9 0x000000000040517f in do_neural_network (features=..., labels=..., test_features=..., predicted_labels=...) at main.cpp:41
#10 0x0000000000406824 in doit () at main.cpp:89
#11 0x000000000040698e in main (argc=1, argv=0x7fffffffdf08) at main.cpp:101
It seems that something is wrong with the values in feat and lab which are given to do_neural_network() and subsequently to af.train(features, labels)
This is the furthest I can get with my programming skills, could someone please help me or at least give me a hint?
It looks like there is a bug that occurs when all of the labels are homogeneous. Thanks for finding it--I will fix it. For now, a simple work-around is to change at least one of your labels to a non-zero value.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I managed to get the library compiled and ran the hello_ml example successfully now :) I tried to get one step further by modifying the code so it fits my problem better. However I wasn't able to run it without crashing. Basically I only removed everything other than neural network (compiled and ran fine). Then I changed the data fields (no continuous ones, only specified; only one label). I proceded to fill the feat and lab variables (all set to 0 for starters). I chanced the test_features to 10 and predicted_labels to 1.
However, when I try to run it I get this:
Floating point exception (core dumped)
Hooking into it with db and getting a backtrace results in this:
It seems that something is wrong with the values in feat and lab which are given to do_neural_network() and subsequently to af.train(features, labels)
This is the furthest I can get with my programming skills, could someone please help me or at least give me a hint?
Thanks a lot and best regards,
Chris
Please find my changed code below for reference:
It looks like there is a bug that occurs when all of the labels are homogeneous. Thanks for finding it--I will fix it. For now, a simple work-around is to change at least one of your labels to a non-zero value.
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks a lot for your quick answers! Really got to create an account. Thanks also for all your work with waffles, it's fun to work with it :)