Transforms an object into a function that initializes a module.
oryx.core.state.init(
obj, *, name: Optional[str] = None
) -> Callable[..., oryx.core.state.Module
]
init
is used to create Module
s from other Python data structures or
objects. For example, init
-ing function would involve tracing
it to find variable
and assign
primitives, which would then be used to
define a module's variables()
and its call_and_update
method.
Another example would be a neural network template object, which can be
init
-ed to return a function that returns a neural network layer module.
Args |
obj
|
The object to be initialized.
|
name
|
A string name for the initialized module..
Default value: None
|
Returns |
A function that when called, returns an initialized Module object.
|