-
Notifications
You must be signed in to change notification settings - Fork 440
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
MNIST example from the cargo book not working and/or deviating from the official mnist example from the examples #1976
Comments
The issue here is that the book is rendered for the last released version (i.e., 0.13.2) while the examples linked are on the main branch. We could probably link to the release version of the examples: https://github.com/tracel-ai/burn/tree/release/0.13/examples. Also, the hidden code blocks have been added in PR #1742, but since no release has been made the changes were not applied to the book online. /edit: at the same time, we do have a warning at the beginning of the guide! |
Thank you for your comment! |
Are you perhaps looking at the mnist example and not the guide? |
Oh, that could be. |
The examples are not identical. The guide only uses the wgpu backend while the mnist example is configurable to demonstrate how to use different backends. I agree though that they are pretty similar. But we just added a list of examples in PR #1966 which should (hopefully) help clear up the confusion. |
Maybe we should remove the MNIST example and only keep the guide, it's probably less confusing. We may simply convert the current mnist example to a more general image-classification example using cifar instead, or something like that. |
Just keep in mind there is web mnist example that uses the output of mnist training. I optimized the model for web. |
Maybe a good change would be to rename the mnist-example to something like "multiple_backends_mnist". I feel like it ist mostly designed to showcase the ease of switching between different backends. Mnist is only a means to a goal. And maybe just maybe I am simply uniquely stupid and this isn't a problem at all and other people have no problem with this issue ;-) |
I think you bring a valid point 🙂 we should probably review the examples name to make them a bit more clear |
Hi,
The official mnist-code-along-example from the burn book has numerous problems. If I use the declared version 0.13.2 with the declared features and use only the code form the burn book and copy it there are a few compiler errors:
Module
-derive-macro used inmodel.rs
panics apparently.training.rs
in the functiontrain
when defining the variablelearner
I get this problem:Also: The official MNIST example is not the same as the one in the burn book. There are a lot of things different. It would be really nice, if the first thing that people arrive at when learning about burn - the tutorial - is really working and also not that confusing. And even if something does not work one could easily check the working code to compare with one's own example.
It would be nice, if the all needed includes would also be in the code examples. They could also be hidden like the code blocks here in the nominomicon (nom tutorial) where one can click on the eye-symbol to reveal hidden
use
-statements.It's really frustrating especially in this mnist example, because a lot of it only works in the end (when every thing comes together). It's a rather large introduction that takes some time to write down. If in the end it doesn't compile its not really useful as a welcoming tool to the world of burn.
The text was updated successfully, but these errors were encountered: