Linear#

class cuequivariance_jax.flax_linen.Linear(irreps_out: ~cuequivariance.irreps_array.irreps.Irreps | str, layout: ~cuequivariance.irreps_array.irreps_layout.IrrepsLayout | None = None, force: bool = False, kernel_init: ~jax.nn.initializers.Initializer | ~collections.abc.Callable[[...], ~typing.Any] = <function normal>, parent: ~flax.linen.module.Module | ~flax.core.scope.Scope | ~flax.linen.module._Sentinel | None = <flax.linen.module._Sentinel object>, name: str | None = None)#

Equivariant linear layer.

Parameters:
  • irreps_out (Irreps) – The output irreps. (The input irreps are inferred from the input.)

  • layout (IrrepsLayout) – The layout of the output irreps.

  • force (bool) – If False, the output irreps are filtered to contain only the reachable irreps from the input.

kernel_init(
shape: ~collections.abc.Sequence[int] = (),
dtype: str | type[~typing.Any] | ~numpy.dtype | ~jax._src.typing.SupportsDType = <class 'float'>,
) Array#

Sample standard normal random values with given shape and float dtype.

The values are returned according to the probability density function:

\[f(x) = \frac{1}{\sqrt{2\pi}}e^{-x^2/2}\]

on the domain \(-\infty < x < \infty\)

Parameters:
  • key – a PRNG key used as the random key.

  • shape – optional, a tuple of nonnegative integers representing the result shape. Default ().

  • dtype – optional, a float dtype for the returned values (default float64 if jax_enable_x64 is true, otherwise float32).

Returns:

A random array with the specified shape and dtype.