-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Add training loop to docs #1488
Conversation
cc @ToucheSir |
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.
Looks great, thanks for adding this!
|
||
```@docs | ||
Flux.Optimise.train! | ||
``` | ||
|
||
There are plenty of examples in the [model zoo](https://github.com/FluxML/model-zoo). | ||
There are plenty of examples in the [model zoo](https://github.com/FluxML/model-zoo), and |
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 are plenty of examples in the [model zoo](https://github.com/FluxML/model-zoo), and | |
Like the loop above, `train!` expects the data to be [iterable](https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-iteration). Most default collections Julia, like `Array`s, are iterable. | |
There are plenty more examples in the [model zoo](https://github.com/FluxML/model-zoo), and |
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 already mention and demonstrate the iteration twice in the couple lines above, do we need it again here?
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.
People unfamiliar to Julia may not realize that the syntax for x in xs
requires the iteration interface. The suggestion was made to make understanding the resulting method error easier for new users.
This also links to the correct point in the docs to read about custom training loop behaviour.