def make_batch(datas, train=True):
allconcat = np.concatenate(datas, axis=0)
if args.gpu >= 0:
allconcat = cuda.cupy.array(allconcat)
batch = xp.split(allconcat, allconcat.shape[1], axis=1)
batch = [xp.reshape(x, (x.shape[0], x.shape[2])) for x in batch]
return batch
train_model.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录