How to most effectively update the shared weights of a Siamese Net, given contrastive loss function in Tensorflow?
Siamese Net BackProp, how to effectively update?
158 views Asked by trdavidson At
1
How to most effectively update the shared weights of a Siamese Net, given contrastive loss function in Tensorflow?
Abstract the network that produces the embeddings into a function. Just call the function twice - once for each image you pass in. It's referred to as two networks... that seems like an overstatement to me. It's just that you pass it through the same network. You'll want to reuse variables in between the two function calls. My code looks something like this: