parameter.NormalizedParameter
parameter.NormalizedParameter(value)Parameter rescaled by its own initial value, so its leaf starts at one.
The common case of RescaledParameter: the starting value is also the scale, which suits parameters that should explore a range comparable to where they begin. .value holds ones and .constrained_value returns scale * .value.
Prefer RescaledParameter with an explicit scale when the parameter starts near zero or has to change sign, since its own start is then far smaller than the range it needs to cover.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| value | Union[float, int, jnp.ndarray] | The original parameter value, used as the static scale. | required |
Examples
>>> param = NormalizedParameter(jnp.array([2.0, 4.0, 6.0]))
>>> param.value # Internal normalized storage (ones)
Array([1., 1., 1.], dtype=float32)
>>> param.__jax_array__() # External scaled values (scale * ones)
Array([2., 4., 6.], dtype=float32)
>>> param.scale # Static scale factor
Array([2., 4., 6.], dtype=float32)