chainer.initializers.generate_array

chainer.initializers.generate_array(initializer, shape, xp)[source]

Return initialized array.

The algorithms used to make the new values depend on the concrete derived classes. If the initializer has the dtype attribute, it is used to construct the array. Otherwise, chainer.config.dtype is used instead. See Configuring Chainer for the dtype config.

Parameters:
Returns:

An initialized array.

Return type:

numpy.ndarray or cupy.ndarray