Using variable declared at a broader scope in a function is bad form #3800
Labels
Priority: P2 - no schedule
Best effort response and resolution. We have no plan to work on this at the moment.
In person I would argue vociferously that this is kind of a major sin . tx should either be passed in as an argument or both tx and update_step should live on some object of which tx should be a variable. Maybe the neural network instance, that way all of the code in this tutorial can be typed into a single notebook without the later declaration of update_step shadowing the first one.
flax/docs/guides/flax_fundamentals/state_params.rst
Line 59 in 514c111
The text was updated successfully, but these errors were encountered: