pyhgf.utils.weight_initialisation.xavier_init#
- pyhgf.utils.weight_initialisation.xavier_init(n_parents, n_children, seed=None)[source]#
Xavier / Glorot uniform initialisation.
Draws weights from \(\\mathcal{U}(-a, a)\) where \(a = \\sqrt{6 / (n_{\\text{parents}} + n_{\\text{children}})}\).
- Parameters:
- Returns:
Weight vector of length
n_parents * n_children.- Return type: