train.py 文件源码

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

项目:CGAN 作者: theflashsean1 项目源码 文件源码
def _plot(samples):
    fig = plt.figure(figsize=(10, 10))
    gs = gridspec.GridSpec(10, 10)
    gs.update(wspace=0.05, hspace=0.05)

    for i, sample in enumerate(samples):
        ax = plt.subplot(gs[i])
        plt.axis('off')
        ax.set_xticklabels([])
        ax.set_yticklabels([])
        ax.set_aspect('equal')
        plt.imshow(sample.reshape(28, 28), cmap='Greys_r')
    return fig
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号