net.py 文件源码

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

项目:net-archive 作者: natanielruiz 项目源码 文件源码
def fcn(split, tops):
    n = caffe.NetSpec()
    n.color, n.hha, n.label = L.Python(module='nyud_layers',
            layer='NYUDSegDataLayer', ntop=3,
            param_str=str(dict(nyud_dir='../data/nyud', split=split,
                tops=tops, seed=1337)))
    n = modality_fcn(n, 'color', 'color')
    n = modality_fcn(n, 'hha', 'hha')
    n.score_fused = L.Eltwise(n.score_frcolor, n.score_frhha,
            operation=P.Eltwise.SUM, coeff=[0.5, 0.5])
    n.upscore = L.Deconvolution(n.score_fused,
        convolution_param=dict(num_output=40, kernel_size=64, stride=32,
            bias_term=False),
        param=[dict(lr_mult=0)])
    n.score = crop(n.upscore, n.color)
    n.loss = L.SoftmaxWithLoss(n.score, n.label,
            loss_param=dict(normalize=False, ignore_label=255))
    return n.to_proto()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号