gpt4 book ai didi

facebook - 连体网络 : Why does the network to be duplicated?

转载 作者:行者123 更新时间:2023-12-04 03:01:38 25 4
gpt4 key购买 nike

来自 Facebook 的 DeepFace 论文使用 Siamese 网络来学习度量。他们说提取 4096 维人脸嵌入的 DNN 必须在 Siamese 网络中复制,但两个副本共享权重。但是如果它们共享权重,那么其中一个的每次更新也会改变另一个。那么为什么我们需要复制它们呢?

为什么我们不能只将一个 DNN 应用于两个人脸,然后使用度量损失进行反向传播?他们可能是这个意思,只是为了“更好地”理解而谈论重复的网络吗?

引自论文:

We have also tested an end-to-end metric learning ap- proach, known as Siamese network [8]: once learned, the face recognition network (without the top layer) is repli- cated twice (one for each input image) and the features are used to directly predict whether the two input images be- long to the same person. This is accomplished by: a) taking the absolute difference between the features, followed by b) a top fully connected layer that maps into a single logistic unit (same/not same). The network has roughly the same number of parameters as the original one, since much of it is shared between the two replicas, but requires twice the computation. Notice that in order to prevent overfitting on the face verification task, we enable training for only the two topmost layers.

论文:https://research.fb.com/wp-content/uploads/2016/11/deepface-closing-the-gap-to-human-level-performance-in-face-verification.pdf

最佳答案

简短的回答是肯定的,我认为查看网络的架构将帮助您了解正在发生的事情。你有两个“连接在一起”的网络,即共享权重。这就是使它成为“连体网络”的原因。诀窍是您希望输入网络的两个图像通过相同的嵌入函数。因此,为了确保这种情况发生,网络的两个分支都需要共享权重。

然后我们将两个嵌入组合成一个度量损失(在下图中称为“对比损失”)。我们可以像往常一样反向传播,我们只有两个可用的输入分支,这样我们就可以一次输入两个图像。

我认为一张图片胜过一千个字。因此,请查看下面的(至少在概念上)如何构建连体网络。

A Siamese Network Architecture

关于facebook - 连体网络 : Why does the network to be duplicated?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48693224/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com