Coder Social home page Coder Social logo

bentengma / learningtocompare-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dragen1860/learningtocompare-pytorch

0.0 1.0 0.0 31 KB

Pytorch Implementation for CVPR2018 Paper: Learning to Compare: Relation Network for Few-Shot Learning

Python 100.00%

learningtocompare-pytorch's Introduction

LearningToCompare

Pytorch Implementation for Paper: Learning to Compare: Relation Network for Few-Shot Learning

Howto

download mini-imagenet and make it looks like:

mini-imagenet/
├── images
	├── n0210891500001298.jpg  
	├── n0287152500001298.jpg 
	...
├── test.csv
├── val.csv
└── train.csv

LearningToCompare-Pytorch/
├── compare.py
├── MiniImagenet.py
├── Readme.md
├── repnet.py
├── train.py
└── utils.py
python train.py

NOTICE

current code support multi-gpus on single machine training, to disable it and train on single machine, just set device_ids=[0] and downsize batch size according to your gpu memory capacity. make sure ckpt directory exists, otherwise mkdir ckpt.

mini-Imagenet

Model Fine Tune 5-way Acc. 20-way Acc
1-shot 5-shot 1-shot 5-shot
Matching Nets N 43.56% 55.31% 17.31% 22.69%
Meta-LSTM 43.44% 60.60% 16.70% 26.06%
MAML Y 48.7% 63.11% 16.49% 19.29%
Meta-SGD 50.49% 64.03% 17.56% 28.92%
TCML 55.71% 68.88% - -
Learning to Compare N 57.02% 71.07% - -
Ours, similarity ensemble N 55.2% 68.8%
Ours, feature ensemble N 55.2% 70.1%

learningtocompare-pytorch's People

Contributors

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