visualize.py 文件源码

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

项目:chainer-visualization 作者: hvy 项目源码 文件源码
def tile_ims(filename, directory):

    """Load all images in the given directory and tile them into one."""

    ims = [mpimg.imread(os.path.join(directory, f)) for f in sorted(os.listdir(directory))]
    ims = np.array(ims)
    ims = ims.transpose((0, 3, 1, 2))  # (n, h, w, c) -> (n, c, h ,w)
    save_ims(filename, ims)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号