pix2pix_model.py 文件源码

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

项目:sciencebeam-gym 作者: elifesciences 项目源码 文件源码
def replace_black_with_white_color(image_tensor):
  is_black = tf.reduce_all(
  tf.equal(image_tensor, (0, 0, 0)),
    axis=-1
  )
  is_black = tf.stack([is_black] * 3, axis=-1)
  return tf.where(
    is_black,
    255 * tf.ones_like(image_tensor),
    image_tensor
  )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号