pyhgf.utils.weight_initialisation.orthogonal_init#
- pyhgf.utils.weight_initialisation.orthogonal_init(n_parents, n_children, gain=1.0, seed=None)[source]#
Orthogonal initialisation.
Generates a random matrix, computes its SVD, and returns the (semi-)orthogonal factor scaled by gain. This preserves gradient norms during backpropagation.
- Parameters:
- Returns:
Weight vector of length
n_parents * n_children.- Return type: