【问题标题】:Weight update of Siamese networks in CaffeCaffe 中 Siamese 网络的权重更新
【发布时间】:2017-03-02 10:53:53
【问题描述】:

关注本站

http://caffe.berkeleyvision.org/gathered/examples/siamese.html

, 我可以在 Caffe 中使用 Siamese 网络,它共享每一层的权重。

但是,我想知道 Caffe 中的 Siamese 网络如何更新它们的共享权重。 具体来说,如果我们有

input1 -> conv1(shared) -> output1

input2 -> conv1(shared) -> output2 ===> contrastive loss(来自 output1 和 output2),

那么,Caffe 是否只是将来自第一个和第二个网络的 conv1 的两个梯度相加?

感谢您提前回复。

【问题讨论】:

    标签: deep-learning caffe backpropagation pycaffe


    【解决方案1】:

    你是对的,共享权重(所有同名参数)的差异(梯度)是累积的。 请注意,您不能对共享权重使用不同的学习率乘数 (lr_mult)。动量和重量衰减等其他功能应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 2015-05-03
      • 1970-01-01
      • 2021-08-06
      • 1970-01-01
      • 1970-01-01
      • 2019-07-05
      • 2018-05-11
      • 2019-07-17
      • 2016-12-05
      相关资源
      最近更新 更多