In this section, we will first go through a simple exercise of regression of sinusoidal data using MAML.
Exercises
A simple implementation of model-agnostic meta-learning
For this tutorial, we will be showcasing how we can apply MAML to learn a simple curve of sinusoidal data. The second part of this tutorial is available on GitHub, where we can learn about how to train MAML on mini-ImageNet using the torch-meta library.
Let's begin this tutorial by going through the following steps:
- Import all libraries:
import math
import random
import torch
from torch import nn
from torch.nn import functional as F
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
%matplotlib inline
- Create a simple...