jax.nn.initializers.zeros#
- jax.nn.initializers.zeros(key, shape, dtype=<class 'jax.numpy.float64'>)[source]#
An initializer that returns a constant array full of zeros.
The
key
argument is ignored.>>> import jax, jax.numpy as jnp >>> jax.nn.initializers.zeros(jax.random.key(42), (2, 3), jnp.float32) Array([[0., 0., 0.], [0., 0., 0.]], dtype=float32)
- Parameters:
key (KeyArray)
shape (core.Shape)
dtype (DTypeLikeInexact)
- Return type: