Skip to content

PyTorch implementation of Model Agnostic Meta Learning (MAML)

License

Notifications You must be signed in to change notification settings

vdevmcitylp/maml-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maml-pytorch

This repository is an implementation of Model Agnostic Meta-Learning by Finn et al. in PyTorch.

Currently, the code supports first-order MAML (FOMAML) & the Omniglot dataset.

Requirements

  • Python 3.5.2
  • Pytorch 1.3.1
  • Torchmeta 1.2.1

Acknowledgments

This blog post by Oscar Knagg helped me immensely.

Usage

Setup hyperparameters in config.yml.

dataset: omniglot
num_ways: 5
num_shots: 1
meta:
  training_iterations: 10000
  batch_size: 16
  lr: 1.0e-3
inner:
  batch_size: 1
  training_iterations: 1
  lr: 0.4
logs:
  val_interval: 100
  writer_interval: 100
device: 'cpu'               # or 'gpu'

Run main.py.

python main.py

[RECOMMENDED]

To check tensorboard, open up a command prompt and enter,

tensorboard --logdir=tensorboard-runs/

You can select the run ID from the list on the bottom left.

About

PyTorch implementation of Model Agnostic Meta Learning (MAML)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages