mlx.nn.init.orthogonal

目录

mlx.nn.init.orthogonal#

orthogonal(gain: float = 1.0, dtype: Dtype = mlx.core.float32) Callable[[array], array]#

An initializer that returns an orthogonal matrix.

参数:
  • gain (float, optional) -- Scaling factor for the orthogonal matrix. Default: 1.0.

  • dtype (Dtype, optional) -- Data type of the array. Default: float32.

返回:

An initializer that returns an orthogonal matrix with the same shape as the input.

返回类型:

Callable[[array], array]