datasets.py 文件源码

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

项目:self-supervision 作者: gustavla 项目源码 文件源码
def resize_to_ensure_size(image, target_height, target_width):
    height, width, _ = _ImageDimensions(image, static_only=False)

    #if height < target_height or width < target_width:
        # Do not preserve aspect ratio
    image4 = tf.expand_dims(image, 0)
    image = tf.image.resize_bilinear(image4, [tf.maximum(height, target_height), tf.maximum(width, target_width)])
    return image[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号