Skip to content

ConstantΒΆ

Constant initializer which always returns the same value.

ParametersΒΆ

  • value (float)

ExamplesΒΆ

>>> from river import optim

>>> init = optim.initializers.Constant(value=3.14)

>>> init(shape=1)
3.14

>>> init(shape=2)
array([3.14, 3.14])

MethodsΒΆ

call

Returns a fresh set of weights.

Parameters

  • shape – defaults to 1