
MAML-net
Image classification18 ops32.9K params
Three few-shot image learners: the MAML conv base learner, a Matching Network and a Triplet network.
Image classification · 50 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
TripletNet is the triplet network: when fed with 3 samples, the network outputs 2 intermediate values, the L2 distances between the embedded representation of two of its inputs from the representation of the third.
About this model's family
Three few-shot learners share this family: the convolutional base learner from Model-Agnostic Meta-Learning (MAML), a Matching Network and a Triplet network, all small image networks meant to solve new learning tasks using only a small number of training samples. MAML's idea is to train the model's initial parameters such that the model has maximal performance on a new task after the parameters have been updated through one or more gradient steps. In effect, the method trains the model to be easy to fine-tune. The network traced here is MAML's classification learner, which has 4 modules with a 3 × 3 convolutions and 64 filters, followed by batch normalization, a ReLU nonlinearity, and 2 × 2 max-pooling. For MiniImagenet the paper used 32 filters per layer to reduce overfitting, and that is the width the captured member carries.
The Matching Network comes from Matching Networks for One Shot Learning, which learns a network that maps a small labelled support set and an unlabelled example to its label, obviating the need for fine-tuning to adapt to new class types. Its output for a new class is a linear combination of the labels in the support set. The weights come from an attention kernel, the simplest form being the softmax over the cosine distance between the embedded query and support examples. The paper's second insight is a training procedure built on a simple principle: test and train conditions must match. The embedding the captured member uses is the paper's simple yet powerful CNN: a stack of modules, each a 3 × 3 convolution with 64 filters followed by batch normalization, a Relu non-linearity and 2 × 2 max-pooling. The captured build leaves out the Full Contextual Embeddings, the LSTM additions that on Omniglot made no difference.
The Triplet network, from Deep metric learning using Triplet network, aims to learn useful representations by distance comparisons rather than as a side effect of classification. It is comprised of 3 instances of the same feedforward network with shared parameters, and when fed with 3 samples it outputs the two L2 distances between the embedded representation of two of its inputs from the representation of the third. A SoftMax over the two distances turns the task into a 2-class classification problem: which of x+ and x− is of the same class as x. On STL10 the TripletNet achieved the best known result for non-augmented data.
Key idea. MAML trains the model's parameters so that a small number of gradient steps with a small amount of training data from a new task will produce good generalization performance on that task. Matching Networks learn a network that maps a small labelled support set and an unlabelled example to its label, with no fine-tuning needed for new class types. The Triplet network learns useful representations by distance comparisons, using 3 instances of the same feedforward network with shared parameters.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{he2015deepresiduallearningimage,
title={Deep Residual Learning for Image Recognition},
author={Kaiming He and Xiangyu Zhang and Shaoqing Ren and Jian Sun},
year={2015},
eprint={1512.03385},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1512.03385},
}