chainer.functions.transpose_sequence¶
-
chainer.functions.transpose_sequence(xs)[source]¶ Transpose a list of Variables.
This function transposes a list of
Variables and returns a list ofVariables. For example a user gives[(0, 1, 2, 3), (4, 5), (6)], the function returns[(0, 4, 6), (1, 5), (2), (3)]. Note that a given list needs to be sorted by each length ofVariable.Parameters: xs (list of ~chainer.Variable) – Variables to transpose. Returns: Transposed list. Return type: tuple or Variable