train_model.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:ROCStory_skipthought_baseline 作者: soskek 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号