chainer.functions.pad_sequence¶
- chainer.functions.pad_sequence(xs, length=None, padding=0)[source]¶
Pad given arrays to make a matrix.
- Parameters
xs (list of ~chainer.Variable or N-dimensional array) – Variables you want to concatenate.
length (None or int) – Size of the first dimension of a padded array. If it is
None
, the longest size of the first dimension ofxs
is used.
- Returns
A padded matrix. Its shape is
(n, length, ...)
, wheren == len(xs)
.- Return type