pix2pix.py 文件源码

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

项目:ml_gans 作者: imironhead 项目源码 文件源码
def build_output(model):
    """
    save translation result to FLAGS.target_image_path.
    """
    images = tf.concat(
        [model['source_images'], model['output_images']], axis=2)

    images = tf.reshape(images, [FLAGS.batch_size * 256, 512, 3])

    images = tf.saturate_cast(images * 127.5 + 127.5, tf.uint8)

    images = tf.image.encode_png(images)

    return tf.write_file(FLAGS.target_image_path, images)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号