chainer.functions.broadcast_to(x, shape)[source]

与えられた変数を与えられた形(shape)にブロードキャストする。

 

Parameters:
Returns:

Output variable broadcasted to the given shape.

Return type:

Variable

 

Example

 


>>> x = np.arange(0, 3)
>>> x
array([0, 1, 2])
>>> y = F.broadcast_to(x, (3, 3))
>>> y.data
array([[0, 1, 2], [0, 1, 2], [0, 1, 2]])