Skip to content
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

Merged
merged 1 commit into from
Jan 29, 2021
Merged

Conversation

DhairyaLGandhi
Copy link
Member

This also links to the correct point in the docs to read about custom training loop behaviour.

@DhairyaLGandhi
Copy link
Member Author

cc @ToucheSir

Copy link
Member

@ToucheSir ToucheSir left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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?

Copy link
Member

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.

@DhairyaLGandhi DhairyaLGandhi merged commit b5e5741 into FluxML:master Jan 29, 2021
@DhairyaLGandhi DhairyaLGandhi deleted the dg/traindocs branch January 29, 2021 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants