plot.py 文件源码

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

项目:DeepMonster 作者: olimastro 项目源码 文件源码
def show_samples(y, ndim, nb=10, cmap=''):
    if ndim == 4:
        for i in range(nb**2):
            plt.subplot(nb, nb, i+1)
            plt.imshow(y[i], cmap=cmap, interpolation='none')
            plt.axis('off')

    else:
        x = y[0]
        y = y[1]
        plt.figure(0)
        for i in range(10):
            plt.subplot(2, 5, i+1)
            plt.imshow(x[i], cmap=cmap, interpolation='none')
            plt.axis('off')

        plt.figure(1)
        for i in range(10):
            plt.subplot(2, 5, i+1)
            plt.imshow(y[i], cmap=cmap, interpolation='none')
            plt.axis('off')

    plt.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号