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. The dtype of a generated array depends on
initializer.dtype
.Parameters: - initializer – A callable object that takes
numpy.ndarray
orcupy.ndarray
and edits its value. - shape (tuple) – Shape of a return array.
- xp (module) –
cupy
ornumpy
.
Returns: An initialized array.
Return type: - initializer – A callable object that takes