-
Notifications
You must be signed in to change notification settings - Fork 90
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
Adding float mnist_simple example #215
Conversation
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I never saw this because I still did not have mailman3 working right for the mlpack-git list. Sorry about that... I would have reviewed this earlier otherwise. This is definitely a nice thing to include, but I wonder if calling the example mnist_cnn_fp32
might be more clear for people scrolling through. Alternately, I wonder if just making another file mnist_cnn_fp32.cpp
in the mnist_cnn
directory would suffice. I don't think I have an opinion either way.
Fingers crossed that mailman3 successfully delivers this message to the mlpack-git list... 😄
mnist_cnn_float/mnist_cnn.cpp
Outdated
|
||
data::Save("model.bin", "model", model, false); | ||
|
||
cout << "Predicting on test set..." << endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked through the test output and it seems like something fails here after this output:
https://dev.azure.com/mlpack/84320e87-76e3-4b6e-8b6e-3adaf6b36eed/_apis/build/builds/9352/logs/15
2023-09-21T12:51:20.9728229Z Predicting on test set...
2023-09-21T12:51:20.9728383Z Example failed: mnist_cnn_float
But, unfortunately, the CI output isn't more than that. Does the whole example run for you successfully locally?
mnist_cnn_float/mnist_cnn.cpp
Outdated
@@ -0,0 +1,229 @@ | |||
/** | |||
* An example of using Convolutional Neural Network (CNN) for | |||
* solving Digit Recognizer problem from Kaggle website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth adding a comment pointing out that this is similar to the other example, but in this one we use fp32 precision. (Same for the mnist_simple
example.)
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Signed-off-by: Omar Shrit <omar@avontech.fr>
@rcurtin both of the examples has start training as usual, no problem while loading and training the data. |
Signed-off-by: Omar Shrit <omar@avontech.fr>
okay I am getting a segmentation fault during the prediction of the mnist_simple, the reason for this is that I forgot to register the layers for float so the model matrix was empty and therefore armadillo throw the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, nice to add this. I think we should probably reorganize all the examples at some point (like #191 or similar), but that doesn't change that we definitely should merge this. Thanks for working out all the issues 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second approval provided automatically after 24 hours. 👍
No description provided.