layers.py 文件源码

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

项目:crfrnn_layer 作者: HapeMask 项目源码 文件源码
def __init__(self, values, ref_img, sxy=60, sc=10, norm_type="sym",
                 name=None):

        C = ll.get_output_shape(ref_img)[1]
        if C not in [1, 3]:
            raise ValueError("Bilateral filtering requires a color or \
greyscale reference image. Got %d channels." % C)

        if C == 1:
            kern_std = np.array([sxy, sxy, sc], np.float32)
        else:
            kern_std = np.array([sxy, sxy, sc, sc, sc], np.float32)

        super(BilateralFilterLayer, self).__init__(values, ref_img, kern_std,
                                                   norm_type, name=name,
                                                   _bilateral=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号