initialize_parameters#
- penzai.deprecated.v1.nn.parameters.initialize_parameters(model: Any, prng_key: jax.Array) Any [source]#
Initializes all parameters in a model.
- Parameters:
model – Model to initialize.
prng_key – Key to use to initialize parameters.
- Returns:
Copy of
model
, where each instance ofUninitializedParameter
is replaced with aParameter
initialized using an independent PRNG key derived fromprng_key
. Keys are derived from the names of the parameters, so parameters with the same name will be initialized consistently if this method is given the same key.