簡體   English   中英

Keras 中的連體神經網絡 + 分類器 (FFN)

[英]Siamese Neural Network + Classifier (FFN) in Keras

我會嘗試實現一個連體神經網絡,它具有 output 不僅具有相似性度量,而且還能夠對每對輸入的標簽進行分類。 輸入是語義音頻嵌入。 其實我有兩個問題:

1:在連體神經網絡中,標簽是“對的標簽”? 是否也有可能保留單輸入的label? 我的意思是有可能計算結合分類器損失+相似性度量的損失 function 嗎?

2:你認為我應該划分問題嗎? I mean two networks, one is the siamese and then get the output embedding of the siamese and feed the Feed Forward network with the siamese output?(saving the similarity metric and using in the loss function of the second neural network?)

希望我能很好地解釋這個問題,並希望有人有解決方案。 麥克風

對於第一個問題,你可以看看https://www.tensorflow.org/guide/keras/train_and_evaluate#custom_losses

他們在那里給出了如何編寫自定義損失 function 的示例。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM