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

Random state within a Loss #215

Open
cgarciae opened this issue Jan 9, 2022 · 0 comments
Open

Random state within a Loss #215

cgarciae opened this issue Jan 9, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@cgarciae
Copy link
Collaborator

cgarciae commented Jan 9, 2022

Losses currently cannot use random state, while its not that common its sometime needed and it should be supported. There are two ways of going about this:

  1. Let Losses optionally accept a next_key: KeySeq argument, no modifications to Loss needed but now Model need to have a next_key: KeySeq field (not that bad).
  2. Let Loss inherit from treex.Treex or even just treeo.Tree so the user can just create its own random state. Downside is that losses are potentially stateful and we would need watch out for the implications when used inside a Metric e.g. Losses and friends.
@cgarciae cgarciae added the enhancement New feature or request label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant