jax.nn.initializers.delta_orthogonal#
- jax.nn.initializers.delta_orthogonal(scale=1.0, column_axis=-1, dtype=<class 'jax.numpy.float64'>)[source]#
Builds an initializer for delta orthogonal kernels.
- Parameters:
scale (RealNumeric) – the upper bound of the uniform distribution.
column_axis (int) – the axis that contains the columns that should be orthogonal.
dtype (DTypeLikeInexact) – the default dtype of the weights.
- Returns:
A delta orthogonal initializer. The shape passed to the initializer must be 3D, 4D, or 5D.
- Return type:
Initializer
Examples:
>>> import jax, jax.numpy as jnp >>> initializer = jax.nn.initializers.delta_orthogonal() >>> initializer(jax.random.key(42), (3, 3, 3), jnp.float32) Array([[[ 0. , 0. , 0. ], [ 0. , 0. , 0. ], [ 0. , 0. , 0. ]], [[ 0.27858758, -0.7949833 , -0.53887904], [ 0.9120717 , 0.04322892, 0.40774566], [-0.30085585, -0.6050892 , 0.73712474]], [[ 0. , 0. , 0. ], [ 0. , 0. , 0. ], [ 0. , 0. , 0. ]]], dtype=float32)