Giter Club home page Giter Club logo

noisy-maml's Introduction

To reproduce the results, we offer the code for "MAML is a noisy contrastive learner" submitted for NeurIPS 2021.

1. Specification of dependencies

1.1 Setup

To avoid conflict with your current setup, please create and activate a virtual environment. The author implements the code on Python 3.7 platform. Please install the required packages with pip install -r requirements.txt.

2 Building up dataset

2.1 miniImagenet

For experiments on miniImagenet dataset, please manually download the miniImagenet dataset here to ./data_miniImagenet folder and unzip it. (ref1 and ref2)

cd ./data_miniImagenet
gdown https://drive.google.com/u/0/uc?id=1HkgrkAwukzEZA0TpO7010PkAOREb2Nukt
unzip mini-imagenet.zip

2.2 Omniglot

For experiments on Omniglot dataset, the dataset will be download automatically.

3. Training code

The four folders below provide the code to reproduce the results in Figure.3 ~ Figure.6.

./omniglot_main
./omniglot_memorization
./miniimagenet_main
./miniimagenet_memorization

To run the code, one can run experiment_command.txt inside each folders to get the results. To faithfully reproduce the results, it is worth noted that we use random seed of 222-225.

cd ./miniimagenet
. experiment_command.txt

To visualize the contrastiveness of the MAML algorithm, please go to ./contrastiveness_visualization and run ./contrastivemess_visualization.py to train models and calculate the cosine similarities. One can also refer to the ipython notebook to directly visualize the results.

noisy-maml's People

Contributors

iandrover 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.