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 mathimport randomimport torchfrom torch import nnfrom torch.nn import functional as Fimport matplotlib as mplmpl.use('Agg')import matplotlib.pyplot as plt%matplotlib inline
- Create a simple neural network architecture. We will be getting randomly generated data of the sinusoidal curve. We will be using this very small network, as we don't ...