Source code for CVPR 2020 paper "Learning to Forget for Meta-Learning"

Overview

L2F - Learning to Forget for Meta-Learning

Sungyong Baik, Seokil Hong, Kyoung Mu Lee

Source code for CVPR 2020 paper "Learning to Forget for Meta-Learning"

Paper

Proposed Meta-Learning

Dataset Preparation

The miniImageNet dataset can be downloaded from the link provided in MAML++ github page.

Once downloaded, place it in the datasets folder.

Note: By downloading and using the miniImageNet datasets, you accept terms and conditions found in imagenet_license.md

Results

  • Note that the reported results for ResNet12 were trained with batch size of 1 to fit into 11GB GPU Memory.
  • With more than 22GB memory, models with ResNet12 backbone can be trained with batch size of 2 (the usual setting for 5-way 5-shot classification) to get higher accuracy.
Model Backbone Batch Size 1-shot Accuracy 5-shot Accuracy
MAML ResNet12 1 51.03±0.50% 68.26±0.47%
MAML+L2F ResNet12 1 57.48±0.49% 74.68±0.43%
MAML ResNet12 2 58.37±0.49% 69.76±0.46%
MAML+L2F ResNet12 2 59.71±0.49% 77.04±0.42%
  • 5-way classification results on miniImageNet

Citation

If you find this code useful for your research, please consider citing the following paper:

@inproceedings{baik2020learning,
    author = {Baik, Sungyong and Hong, Seokil and Lee, Kyoung Mu},
    title = {Learning to Forget for Meta-Learning},
    booktitle = {CVPR},
    year = {2020}
}

Acknowledgement

The main structure of this code is based on MAML++. We thank the authors for sharing the codes for their great works.

You might also like...
Official source code to CVPR'20 paper,
Official source code to CVPR'20 paper, "When2com: Multi-Agent Perception via Communication Graph Grouping"

When2com: Multi-Agent Perception via Communication Graph Grouping This is the PyTorch implementation of our paper: When2com: Multi-Agent Perception vi

Source code for CVPR 2021 paper
Source code for CVPR 2021 paper "Riggable 3D Face Reconstruction via In-Network Optimization"

Riggable 3D Face Reconstruction via In-Network Optimization Source code for CVPR 2021 paper "Riggable 3D Face Reconstruction via In-Network Optimizati

The source code of CVPR 2019 paper
The source code of CVPR 2019 paper "Deep Exemplar-based Video Colorization".

Deep Exemplar-based Video Colorization (Pytorch Implementation) Paper | Pretrained Model | Youtube video 🔥 | Colab demo Deep Exemplar-based Video Col

TensorFlow code for the neural network presented in the paper:
TensorFlow code for the neural network presented in the paper: "Structural Language Models of Code" (ICML'2020)

SLM: Structural Language Models of Code This is an official implementation of the model described in: "Structural Language Models of Code" [PDF] To ap

Source code and data from the RecSys 2020 article
Source code and data from the RecSys 2020 article "Carousel Personalization in Music Streaming Apps with Contextual Bandits" by W. Bendada, G. Salha and T. Bontempelli

Carousel Personalization in Music Streaming Apps with Contextual Bandits - RecSys 2020 This repository provides Python code and data to reproduce expe

Source code for "Progressive Transformers for End-to-End Sign Language Production" (ECCV 2020)

Progressive Transformers for End-to-End Sign Language Production Source code for "Progressive Transformers for End-to-End Sign Language Production" (B

Learning to Simulate Dynamic Environments with GameGAN (CVPR 2020)
Learning to Simulate Dynamic Environments with GameGAN (CVPR 2020)

Learning to Simulate Dynamic Environments with GameGAN PyTorch code for GameGAN Learning to Simulate Dynamic Environments with GameGAN Seung Wook Kim,

An official implementation of
An official implementation of "SFNet: Learning Object-aware Semantic Correspondence" (CVPR 2019, TPAMI 2020) in PyTorch.

PyTorch implementation of SFNet This is the implementation of the paper "SFNet: Learning Object-aware Semantic Correspondence". For more information,

Unofficial implementation of
Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)

TTNet-Pytorch The implementation for the paper "TTNet: Real-time temporal and spatial video analysis of table tennis" An introduction of the project c

Comments
  • Figure 2 플롯 방법

    Figure 2 플롯 방법

    안녕하세요. 먼저 코드를 공유해주셔서 감사합니다. 논문을 보면 [26] 논문에서 보여준 것처럼 Figure 2에서 loss landscape과 gradient predictiveness, 그리고 ꞵ-smoothness에 대한 plot을 확인할 수가 있는데요. 해당 plot들을 어떤 방식으로 구현을 하셨는지 여쭙고 싶습니다.

    1. 각각의 inner-loop step에서 구한 gradient 방향에 대해 learning rate를 조정하여 여러 weight를 구한 다음 각각에 대한 loss 및 gradient를 구해서 plot하는게 맞나요?
    2. Appendix A에서 'We take an average of these values over the number of inner-loop updates and plot them against training iterations'로 표현을 하셨는데, 이는 1에서 조정된 여러 learning rate에 대해 inner-loop step (코드에서는 5회)에 대해 averaging한 것으로 이해하면 될까요?
    3. 1번의 방식이 맞다면, learning rate 조정의 범위는 어떻게 설정하셨는지 여쭙고 싶습니다. [26] 논문을 보면 Appendix A.2.2에서 [1/2, 4] X step size로 스텝 길이를 조정했다고 나와 있는데, 해당 범위 내에서도 선택할 수 있는 값들이 많기 때문에 어떠한 방식으로 진행하셨는지 궁금합니다.

    건강 조심하세요. 감사합니다.

    opened by shlee625 5
  • The implement of Resnet12 backbone

    The implement of Resnet12 backbone

    Hi, thank you for your implement L2F in pytorch.

    But I found the implement is based on the conv4 backbone,could you release the implement of Resnet12 backbone?

    opened by sunhm15 2
  • About LEO and other experiment implement details (like ablation study, conflicts study)

    About LEO and other experiment implement details (like ablation study, conflicts study)

    Hi David! I really appreciate what you did in this work, I believe this should be considered as a great progress in meta-learning. I check your repository and find that the leo experiment and conflicts study mentioned in paper didn't show up here, would you mind adding them to this repository? That would be really helpful, thanks a lot.

    p.s. salute to your hard work with only one 1080ti in all these experiments:)

    opened by ligeng0197 1
Owner
Sungyong Baik
Ph.D. Student in CVLab, SNU
Sungyong Baik
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"

Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision https://arxiv.org/abs/2003.00393 Abstract Active learning (AL) aims to min

Denis 29 Nov 21, 2022
This repository contains the code for the CVPR 2020 paper "Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision"

Differentiable Volumetric Rendering Paper | Supplementary | Spotlight Video | Blog Entry | Presentation | Interactive Slides | Project Page This repos

null 697 Jan 6, 2023
[CVPR 2022] CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation

CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation Prerequisite Please create and activate the following conda envrionment. To r

Qin Wang 87 Jan 8, 2023
Code to reproduce the experiments in the paper "Transformer Based Multi-Source Domain Adaptation" (EMNLP 2020)

Transformer Based Multi-Source Domain Adaptation Dustin Wright and Isabelle Augenstein To appear in EMNLP 2020. Read the preprint: https://arxiv.org/a

CopeNLU 36 Dec 5, 2022
Source code for the GPT-2 story generation models in the EMNLP 2020 paper "STORIUM: A Dataset and Evaluation Platform for Human-in-the-Loop Story Generation"

Storium GPT-2 Models This is the official repository for the GPT-2 models described in the EMNLP 2020 paper [STORIUM: A Dataset and Evaluation Platfor

Nader Akoury 27 Dec 20, 2022
PyTorch implementation of CVPR 2020 paper (Reference-Based Sketch Image Colorization using Augmented-Self Reference and Dense Semantic Correspondence) and pre-trained model on ImageNet dataset

Reference-Based-Sketch-Image-Colorization-ImageNet This is a PyTorch implementation of CVPR 2020 paper (Reference-Based Sketch Image Colorization usin

Yuzhi ZHAO 11 Jul 28, 2022
Code accompanying "Dynamic Neural Relational Inference" from CVPR 2020

Code accompanying "Dynamic Neural Relational Inference" This codebase accompanies the paper "Dynamic Neural Relational Inference" from CVPR 2020. This

Colin Graber 48 Dec 23, 2022
Official code for "End-to-End Optimization of Scene Layout" -- including VAE, Diff Render, SPADE for colorization (CVPR 2020 Oral)

End-to-End Optimization of Scene Layout Code release for: End-to-End Optimization of Scene Layout CVPR 2020 (Oral) Project site, Bibtex For help conta

Andrew Luo 41 Dec 9, 2022
UDP++ (ECCVW 2020 Oral), (Winner of COCO 2020 Keypoint Challenge).

UDP-Pose This is the pytorch implementation for UDP++, which won the Fisrt place in COCO Keypoint Challenge at ECCV 2020 Workshop. Top-Down Results on

null 20 Jul 29, 2022
Code for paper ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization in the Loop.

Who Left the Dogs Out? Evaluation and demo code for our ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization

Benjamin Biggs 29 Dec 28, 2022