Giter Site home page Giter Site logo

zayan2009 / meta-learning-without-memorization Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mingzhang-yin/meta-learning-without-memorization

0.0 1.0 0.0 188 KB

Identify a meta generalization problem, when task distribution is non-mutually-exclusive. Provide a solution to expand the domains that meta-learning can be effectively applied to. (ICLR 2020)

Home Page: https://openreview.net/pdf?id=BklEFpEYwS

Python 38.58% Shell 0.60% Jupyter Notebook 60.83%

meta-learning-without-memorization's Introduction

Meta-Learning without Memorization

In this paper, we address the memorization problem by designing a meta-regularization objective using information theory that places precedence on data-driven adaptation. This causes the meta-learner to decide what must be learned from the task training data and what should be inferred from the task testing input. By doing so, our algorithm can successfully use data from non-mutually-exclusive tasks to efficiently adapt to novel tasks. We demonstrate its applicability to both contextual and gradient-based meta-learning algorithms, and apply it in practical settings where applying standard meta-learning has been difficult. Our approach substantially outperforms standard meta-learning algorithms in these settings.

Below are the paper to cite if you find the algorithms in this repository useful in your own research:

@inproceedings{yin2020metalearning,
title={Meta-Learning without Memorization},
author={Mingzhang Yin and George Tucker and Mingyuan Zhou and Sergey Levine and Chelsea Finn},
booktitle={International Conference on Learning Representations},
year={2020},
}

This repository:

  • Provides code to generate the pose regression dataset used in the paper.
  • Implements Model Agnostic Meta Learning (MAML; Finn et al. 2017) and Neural Processes (NP; Garnelo et al. 2018) with meta-regularization on the weights and activations. We hope that this code will be a useful starting point for future research in this area.

Generating pose regression dataset

Requirements:

  • TensorFlow (see tensorflow.org for how to install)
  • numpy-stl
  • gym
  • mujoco-py

Step 1: Download CAD models from Beyond PASCAL: A Benchmark for 3D Object Detection in the Wild ftp://cs.stanford.edu/cs/cvgl/PASCAL3D+_release1.1.zip and use the CAD folder.

We removed the two classes 'bottle' and 'train' because the objects are symmetric.

Step 2: Convert the CAD models from *.off to *.stl.

You can download a converter from https://www.patrickmin.com/meshconv. Then, run

chmod 755 meshconv
find ./CAD -maxdepth 2 -mindepth 2 -name "*.off" -exec meshconv -c stl {} \;

Step 3: Render the dataset. Using the utilities in pose_data

CAD_DIR=
DATA_DIR=
python mujoco_render.py --CAD_dir=${CAD_DIR} --data_dir=${DATA_DIR}
cp -r ${DATA_DIR}/rotate ${DATA_DIR}/rotate_resize
python resize_images.py --data_dir=${DATA_DIR}/rotate_resize
python data_gen.py --data_dir=${DATA_DIR}/rotate_resize

This generates two pickle files: train_data.pkl and val_data.pkl.

Train models on pose regression dataset

See pose_code/run.sh for examples of training the various algorithms.

This is not an officially supported Google product. It is maintained by George Tucker ([email protected], @georgejtucker, github user: gjtucker).

meta-learning-without-memorization's People

Contributors

dependabot[bot] avatar mingzhang-yin avatar

Watchers

 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.