superres.py 文件源码

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

项目:OneNet 作者: image-science-lab 项目源码 文件源码
def setup(x_shape, resize_ratio):

    box_size = 1.0 / resize_ratio
    if np.mod(x_shape[1], box_size) != 0 or np.mod(x_shape[2], box_size) != 0:
        print "only support width (and height) * resize_ratio is an interger!"


    def A_fun(x):
        y = box_average(x, int(box_size))
        return y

    def AT_fun(y):
        x = box_repeat(y, int(box_size))
        return x

    return (A_fun, AT_fun)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号