Reader small image

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

Product typeBook
Published inDec 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789534207
Edition1st Edition
Languages
Right arrow
Author (1)
Sudharsan Ravichandiran
Sudharsan Ravichandiran
author image
Sudharsan Ravichandiran

Sudharsan Ravichandiran is a data scientist and artificial intelligence enthusiast. He holds a Bachelors in Information Technology from Anna University. His area of research focuses on practical implementations of deep learning and reinforcement learning including natural language processing and computer vision. He is an open-source contributor and loves answering questions on Stack Overflow.
Read more about Sudharsan Ravichandiran

Right arrow

Chapter 4: Relation and Matching Networks Using TensorFlow


  1. A relation network consists of two important functions: the embedding function, denoted by 
    , and the relation function, denoted by 
  2. Once we have the feature vectors of the support set, 
    , and query set,  
    , we combine them using an operator, 
    . Here, 
     can be any combination operator; we use concatenation as an operator to combine the feature vectors of the support set and the query set—that is, 
    .
  1. The relation function, 
    , will generate a relation score ranging from 0 to 1, representing the similarity between samples in the support set, 
    , and samples in the query set, 
    .
  2. Our loss function can be represented as follows:

     

  3. In matching networks, we use two embedding functions, 
     and 
    , to learn the embeddings of the query set 
     and the support set 
    , respectively. 
  4. The output, 

    , for the query point, 

    , can be predicted as follows:

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Meta Learning with Python
Published in: Dec 2018Publisher: PacktISBN-13: 9781789534207

Author (1)

author image
Sudharsan Ravichandiran

Sudharsan Ravichandiran is a data scientist and artificial intelligence enthusiast. He holds a Bachelors in Information Technology from Anna University. His area of research focuses on practical implementations of deep learning and reinforcement learning including natural language processing and computer vision. He is an open-source contributor and loves answering questions on Stack Overflow.
Read more about Sudharsan Ravichandiran