chainer.initializers.Constant

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

Initializes array with constant value.

Variables
  • ~Constant.fill_value (scalar or N-dimensional array) – A constant to be assigned to the initialized array. Broadcast is allowed on this assignment.

  • ~Constant.dtype – Data type specifier.

Methods

__call__(array)[source]

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 (N-dimensional array) – An array to be initialized by this initializer.

__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.

Attributes

fill_value = None