network.py 文件源码

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

项目:FCNN_cell 作者: ale93111 项目源码 文件源码
def lenethdf5d():
    # our version of LeNet: a series of linear and simple nonlinear transformations
    n = caffe.NetSpec()
    #cambiano il primo e gli ultimi 2 strati
    n.data = L.Input(input_param=dict(shape=dict(dim=[1,1,128,128])))

    # the base net
    n.conv1, n.relu1 = conv_relu(n.data, 32)
    n.pool1 = max_pool(n.relu1)
    #n.norm1 = L.LRN(n.pool1, local_size=5, alpha=1e-4, beta=0.75)
    n.conv2, n.relu2 = conv_relu(n.pool1, 64)
    n.pool2 = max_pool(n.relu2)    
    n.conv3, n.relu3 = conv_relu(n.pool2, 128)
    n.pool3 = max_pool(n.relu3)      

    # fully convolutional
    n.fc1, n.rlfc1  = conv_relu(n.pool3, 512, ks=3, pad=1)


    n.decov5 = deconv(n.rlfc1, 128, pad=1)
    n.relu5, n.conv5 = relu_conv(n.decov5, 128, pad=0)
    n.decov6 = deconv(n.conv5, 64, pad=1)
    n.relu6, n.conv6 = relu_conv(n.decov6, 64, pad=0)
    n.decov7 = deconv(n.conv6, 32, pad=1)
    n.relu7, n.conv7 = relu_conv(n.decov7, 32, pad=0)

    n.relu8, n.conv8 = relu_conv(n.conv7, 2, pad=0)  


    n.prob = L.Softmax(n.conv8)

    return n.to_proto()

# create file prototxt for deployment
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号