models.py 文件源码

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

项目:lsun-room 作者: leVirve 项目源码 文件源码
def _crop(target_layer, offset=(None, None), name=None):
    """Crop the bottom such that it has the same shape as target_layer."""
    def f(input):
        width = input._keras_shape[1]
        height = input._keras_shape[2]
        target_width = target_layer._keras_shape[1]
        target_height = target_layer._keras_shape[2]
        cropped = Cropping2D(cropping=((offset[0], width - offset[0] - target_width),(offset[1],height - offset[1] - target_height)), name='{}'.format(name))(input)
        return cropped
    return f
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号