Tags a value as a variable.
oryx.core.state.variable(
value, *, name: str, key=None, mode: str = 'strict'
)
variable
should be used to initialize state in stateful functions.
Typically, variable
will be called with a value downstream of an
initialization key. The init
transformation will then pull all values tagged
as variables in a function body and store them in a Module
.
Args |
value
|
JAX value to be tagged as variable.
|
name
|
string name for the value.
|
key
|
JAX value that is used to tie in value .
Default value: None
|
mode
|
string name for sow mode (see harvest documentation).
Default value: 'strict'
|
Returns |
The value that was passed in.
|