BN-absorber.py 文件源码

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

项目:DepthSegnet 作者: hari-sikchi 项目源码 文件源码
def bn_absorber_prototxt(model):

    # load the prototxt file as a protobuf message
    with open(model) as k:
        str1 = k.read()
    msg1 = caffe_pb2.NetParameter()
    text_format.Merge(str1, msg1)

    # search for bn layer and remove them
    for l in msg1.layer:
        if l.type == "BN":
            msg1.layer.remove(l)

    return msg1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号