class chainer.initializers.Constant(fill_value, dtype=None)[source]

Initializes array with constant value.

  • fill_value (scalar or numpy.ndarray or cupy.ndarray) – A constant to be assigned to the initialized array. Broadcast is allowed on this assignment.
  • dtype – Data type specifier.



Initializes given array.

This method destructively changes the value of array. The derived class is required to implement this method. The algorithms used to make the new values depend on the concrete derived classes.

Parameters:array (numpy.ndarray or cupy.ndarray) – An array to be initialized by this initializer.


fill_value = None