Giter Site home page Giter Site logo

starxing-yuu / pytorch-maml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from katerakelly/pytorch-maml

0.0 0.0 0.0 157 KB

PyTorch implementation of MAML: https://arxiv.org/abs/1703.03400

License: MIT License

Python 16.24% Jupyter Notebook 83.41% Shell 0.35%

pytorch-maml's Introduction

pytorch-maml

This is a PyTorch implementation of the supervised learning experiments from the paper Model-Agnostic Meta-Learning (MAML): https://arxiv.org/abs/1703.03400

Important: You will need the latest version of PyTorch, v.0.2.0 to run this code (otherwise you will get errors about double backwards not being supported).

Currently, only the Omniglot experiments have been replicated here. The hyper-parameters are the same as those used in the original Tensorflow implementation, except that only 1 random seed is used here.

5-way 1-shot training, best performance 98.9%

Alt text

20-way 1-shot training, best performance 92%

Alt text

Note: the 20-way performance is slightly lower than that reported in the paper (they report 95.8%). If you can see why this might be, please let me know. Also in this experiment, we can see evidence of overfitting to the meta-training set.

The 5-way results are achieved by simply meta-testing the network trained on the 1-shot task on the 5-shot task (e.g. for the 5-way 5-shot result, test the 5-way 1-shot trained network with 5-shots). Again the 20-way result is lower here than reported in the paper.

This repo also contains code for running maml experiments on permuted MNIST (tasks are created by shuffling the labels). This is a nice sanity check task.

license

This software is distributed under the MIT license.

to-do

  • port to pytorch 0.4 from 0.2 and python 3 from 2
  • investigate performance difference from TF version
  • add first-order version

pytorch-maml's People

Contributors

katerakelly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.