import numpy as np from chainer import Variable import chainer.functions as F import chainer.links as L # 入力データの準備 x_list = [[0, 1, 2, 3], [4, 5, 6], [7, 8]] # 可変長データ (4, 3, 2)の長さのデータとする x_list = [np.array(x, dtype=np.int32) for x in x_list] # numpyに変換する