Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Meta Learning with Python

You're reading from  Hands-On Meta Learning with Python

Product type Book
Published in Dec 2018
Publisher Packt
ISBN-13 9781789534207
Pages 226 pages
Edition 1st Edition
Languages
Author (1):
Sudharsan Ravichandiran Sudharsan Ravichandiran
Profile icon Sudharsan Ravichandiran

Table of Contents (17) Chapters

Title Page
Dedication
About Packt
Contributors
Preface
1. Introduction to Meta Learning 2. Face and Audio Recognition Using Siamese Networks 3. Prototypical Networks and Their Variants 4. Relation and Matching Networks Using TensorFlow 5. Memory-Augmented Neural Networks 6. MAML and Its Variants 7. Meta-SGD and Reptile 8. Gradient Agreement as an Optimization Objective 9. Recent Advancements and Next Steps 1. Assessments 2. Other Books You May Enjoy Index

Chapter 2: Face and Audio Recognition Using Siamese Networks


  1. A siamese network is a special type of neural network, and it is one of the simplest and most commonly used one-shot learning algorithms. Siamese networks basically consist of two symmetrical neural networks that share the same weights and architecture and are joined together at the end using an energy function, E.  
  2. The contrastive loss function can be expressed as follows: 

    In the preceding equation, the value of Y is the true label, which will be 1 when the two input values are similar and 0 if the two input values are dissimilar, and E is our energy function, which can be any distance measure. The term margin is used to hold the constraint; that is, when two input values are dissimilar and if their distance is greater than a margin, then they do not incur a loss.

  3. The energy function tells us how similar the two inputs are. It is basically any similarity measure, such as Euclidean distance and cosine similarity.

  4. The input to the siamese networks should be in pairs, (X1,X2), along with their binary label, Y ∈ (0, 1),stating whether the input pairs are genuine pairs (the same) orimposite pairs (different). 

  5. The applications of siamese networks are endless; they've been stacked with various architectures for performing various tasks, such as human action recognition, scene change detection, and machine translation. 

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}