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.ndarrayorcupy.ndarrayand edits its value. - shape (tuple) – Shape of a return array.
- xp (module) –
cupyornumpy.
Returns: An initialized array.
Return type: numpy.ndarray or cupy.ndarray
- initializer – A callable object that takes