【caffe c++】网络配置文件说明之全连接层、softmax层

下面代码中没注释的部分看这篇:

【caffe c++】网络配置文件说明之卷积层、池化层

#全连接层,输出的是一个简单向量  参数跟卷积层一样
layer {
  name:"ip1"
  type:"InnerProduct"
  bottom:"pool2"
  top:"ip1"
  param{		#学习率
    lr_mult:1
    }
  param {
    lr_mult:2
    }
  inner_product_param {
    num_output:500		#输出向量的大小
    weight_filler{
        type:"xavier"
       }
    bias_filler{
        type:"constant"
        }
    }
 }

###测试的时候输入准确率
layer{
  name:"accuracy"
  type:"Accuracy"
  bottom:"ip2"
  bottom:"label"
  top:"accuracy"
  include{
    phase:TEST
    }  
}

#softmax-loss layer:输出loss值
layer{
  name:"loss"
  type:"SoftmaxWithLoss"
  bottom:"ip1"
  bottom:"label"
  top:"loss"
}

#softmax layer:输出似然值(准确率)
layer{
  bottom:"cls3_fc"
  top:"prob"
  name:"prob"
  type:"Softmax"
}

其他网络配置文件:
【caffe c++】网络配置文件说明之激活函数

【caffe c++】网络配置文件说明之reshape层

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值