Skip to content

Improve WeightDecay docstring #60

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

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Conversation

mcabbott
Copy link
Member

@mcabbott mcabbott commented Mar 7, 2022

This adds some comments borrowed from Flux in from #46, whose main change we decided wasn't needed.


# Parameters
- Weight decay (`γ`): Decay applied to weights during optimisation.
"""
struct WeightDecay{T}
wd::T
gamma::T
Copy link
Member

Choose a reason for hiding this comment

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

I guess our policy is that most fields are not considered part of the public API?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess so. And that 0.2 was so recent & we're still getting Flux to hook up to it.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah relying on field names is generally not guaranteed, so I think that's a fine policy.

@mcabbott mcabbott merged commit c1c8beb into FluxML:master Mar 7, 2022
@mcabbott mcabbott deleted the decaydocs branch March 7, 2022 16: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