Skip to content

Zeros

Constant initializer which always returns zeros.

Examples

from river import optim

init = optim.initializers.Zeros()

init(shape=1)
0.0

init(shape=2)
array([0., 0.])

Methods

call

Returns a fresh set of weights.

Parameters

  • shape — defaults to 1