-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
Move 5 tutorials from fluxml.github.io #2125
Conversation
Once the build has completed, you can preview any updated documentation at this URL: https://fluxml.ai/Flux.jl/previews/PR2125/ in ~20 minutes |
This comment was marked as off-topic.
This comment was marked as off-topic.
"Linear Regression" => "tutorials/linear_regression.md", | ||
"Julia & Flux: 60 Minute Blitz" => "tutorials/2020-09-15-deep-learning-flux.md", |
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.
What do you think about adding a 🚧 or some admonition in the tutorial itself so that users know this might be out of date? Or is the hope to have those sorted out before these hit a stable release?
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.
Haven't seen one of those in a while! I don't think these are terribly out of date in fact, nothing looks like it clearly won't run.
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.
Found a few places they needed to import params
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.
Re updating, some of these link to the model zoo:
https://github.com/FluxML/model-zoo/blob/master/vision/mlp_mnist/mlp_mnist.jl
https://github.com/FluxML/model-zoo/blob/master/vision/conv_mnist/conv_mnist.jl
https://github.com/FluxML/model-zoo/blob/master/vision/dcgan_mnist/dcgan_mnist.jl
IDK what the plan ought to be for keeping things in sync. These all look like they qualify Flux.params
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.
If we make them literate files, then copying over the model zoo files and deleting them from that repository would work. In the meantime, things can stay as they are.
save("./output.gif", gif_mat) | ||
``` | ||
|
||
![](https://fluxml.ai/assets/tutorialposts/2021-10-08-dcgan-mnist/output.gif) |
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.
We might as well move the assets over so that everything is in one place. @ref
links can be cleaned up later.
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 tried a bit locally, and gave up... IDK why I couldn't get relative links to work. Note that they are broken in the current website version too:
https://fluxml.ai/tutorialposts/2021-10-08-dcgan-mnist/#output
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.
Ok, no use fighting them for a quick PR. I suspect the website links were also a victim of the Franklin migration.
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.
Thanks, @mcabbott!!
I'll look into using Literate.jl for the tutorials.
* `augment` augments the data by adding gaussian random noise to our image to make it more robust: | ||
|
||
```julia | ||
augment(x) = x .+ gpu(0.1f0*randn(eltype(x), size(x))) | ||
``` | ||
|
||
|
||
* `anynan` checks whether any element of the params is NaN or not: | ||
|
||
```julia | ||
anynan(x) = any(y -> any(isnan, y), x) | ||
``` | ||
|
||
* `accuracy` computes the accuracy of our ConvNet: | ||
|
||
```julia | ||
accuracy(x, y, model) = mean(onecold(cpu(model(x))) .== onecold(cpu(y))) | ||
``` |
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.
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.
Thanks I missed that.
IDK. What else goes in there? Lots of the reference sections do start with some text, to supplement the docstrings. The logical place to add something sounds like the MLUtils page. But probably not the exact text, since it's long and doesn't say much? https://fluxml.ai/Flux.jl/stable/destructure/ Alternatively, a bigger "data handling" or something tutorial, which introduces how to read CSV files and image files and so on, as well as data-handling tools, might be nice to have if someone wants to write it. Maybe this is similar to what you picture the "how to" section being -- tutuorial-style pages, but not data-model-train-test examples, instead walk-throughs of other things? |
This moves 5 pages from https://fluxml.ai/tutorials/ to the docs at https://fluxml.ai/Flux.jl/dev/, each of which builds & trains some model. Xref #2105 (comment) about moving them.
I have made no attempt to update them, the main change is replacing the blog's title + author format with an H1 and an
!!! info
block.I have not checked that they run. Nor does this PR make any attempt to make CI run them.
They should certainly be updated to explicit parameters etc. (I presume that by having them in the docs, we are undertaking to keep them up to date, rather than being fixed-in-time blog posts.) But better to make the update a separate PR.