flax.linen.Variable#
- class flax.linen.Variable(scope, collection, name, unbox)[source]#
A Variable object allows mutable access to a variable in a VariableDict.
Variables are identified by a collection (e.g., “batch_stats”) and a name (e.g., “moving_mean”). The value property gives access to the variable’s content and can be assigned to for mutation.
Methods
__init__
(scope, collection, name, unbox)Initializes a variable.
is_mutable
()Checks if this Variable is mutable.
Attributes
value
Returns the value of this Variable.