Skip to content
Discussion options

You must be logged in to vote

Answer from @jheek:

The new variables will also contain the untouched variables as long as you provided them as input to apply. I don't think this should be cumbersome but perhaps I'm missing something.

Typically you would make explicit what types of state (collections) you are expecting because your training pipeline usually has some assumptions about it. Like eval doesn't update batch stats but it might updated cached decoding.

Adding something to mutable that isn't there doesn't have side effects. So you could see it interpret the argument as "in this context I support the following kinds of state: ..."

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marcvanzee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant