Relation networks in few-shot learning

We have seen how we take a single image belonging to each of the classes in the support set and compare their relation to the image in the query set in the one-shot learning setting of our relation network. But in a few-shot learning setting, we will have more than one data point per class. How do we learn the feature representation here using our embedding function?

Say we have a support set containing more than one image for each of the classes, as shown in the following diagram:

In this case, we will learn the embedding of each point in the support set and perform element-wise addition of embeddings of all of the data points belonging to each class. So, we will have embeddings for each of the classes, which is the element-wise summed embeddings of all of the data points in that class:

We can extract the feature vector of our query image using the embedding function as usual. Next, we combine the feature vectors of the support and query sets using the concatenation operator, . We perform concatenation, then we feed our concatenated feature vectors to the relation function and get the relation scores, which represent the similarity between each of the classes in the support set and the query set.

The overall representation of a relation network in a few-shot learning setting is shown in the following figure:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.30.178