Reading the documentation, I understand that you can freeze variables by using a mask based upon name or type.
Is it possible to set a variable to "frozen" within the class definition i.e in the way Equinox has static_field option.
While I understand the concept behind being able to mask out a set of variables contained in a PyTree (or PyTree of PyTrees), there are lots of situations where you know when creating a new class, that certain variables will only ever be constant. Furthermore, as models become much more complicated (or if others may utilise elements of your model) it becomes more cumbersome to have to mask these out / others have to know to do this.
Reading the documentation, I understand that you can freeze variables by using a mask based upon name or type.
Is it possible to set a variable to "frozen" within the class definition i.e in the way Equinox has static_field option.
While I understand the concept behind being able to mask out a set of variables contained in a PyTree (or PyTree of PyTrees), there are lots of situations where you know when creating a new class, that certain variables will only ever be constant. Furthermore, as models become much more complicated (or if others may utilise elements of your model) it becomes more cumbersome to have to mask these out / others have to know to do this.