【问题标题】:Does caffe computes gradients also for layers with learning rate zero (lr_mult = 0) during the backward pass?caffe 是否也在反向传递期间计算学习率为零 (lr_mult = 0) 的层的梯度?
【发布时间】:2018-09-28 05:57:41
【问题描述】:
【问题讨论】:
标签:
performance
machine-learning
computer-vision
caffe
gradient-descent
【解决方案1】:
我对此不是 100% 确定,但即使在 lr_mult: 0 时,AFAIK caffe 也会计算梯度,因为可能在其他地方需要梯度。
您是否尝试过设置propagate_down: false 来阻止渐变传播?
来自caffe.proto:
// Specifies whether to backpropagate to each bottom. If unspecified,
// Caffe will automatically infer whether each input needs backpropagation
// to compute parameter gradients. If set to true for some inputs,
// backpropagation to those inputs is forced; if set false for some inputs,
// backpropagation to those inputs is skipped.