def save_image(image, path):
"""Save an image as a png file"""
image = dcgan_utils.inverse_transform(image)
png_writer = png.Writer(64, 64)
with open(path, 'wb') as outfile:
png_writer.write(outfile, 255*image.reshape([64,-1]))
评论列表
文章目录