读懂caffe模型

本文详细介绍了Caffe模型的构建与配置方法,重点解释了卷积层中lr_mult和decay_mult参数的作用及设置方式,并给出了具体的配置示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

caffe 模型可视化网页网址:http://ethereon.github.io/netscope/#/editor
caffe模型是自底向上流的,所以bottom是前一层,top就是本层,输出层

卷积层

  lr_mult: 學習率的係數,最終的學習率是這個數乘以solver.prototxt配置文檔中的base_lr。如果有兩個lr_mult, 則第一個表示權值的學習率,第二個表示偏置項的學習率。一般偏置項的學習率是權值學習率的兩倍
  r_mult indicates what to multiply the learning rate by for a particular layer. This is useful if you want to update some layers with a smaller learning rate (e.g. when finetuning some layers while training others from scratch) or if you do not want to update the weights for one layer, decay_mult is the same, just for weight decay.

layer {
  name: "conv_att"
  type: "Convolution"
  bottom: "input_feature"
  top: "conv_att"
  param {
    lr_mult: 1 #kernel lr——mult
    decay_mult: 1
  }
  param {
    lr_mult: 2 # bias lr——mult
    decay_mult: 0 
  }
  convolution_param {
    num_output: 8  #输出feature map个数
    kernel_size: 1 # 卷积核大小
    weight_filler {
      type: "msra"
    }
    bias_filler {
      type: "constant"
    }
  }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值