资源算法LearningToCompare-Pytorch

LearningToCompare-Pytorch

2020-02-13 | |  36 |   0 |   0

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

ModelFine Tune5-way Acc.
20-way Acc


1-shot5-shot1-shot5-shot
Matching NetsN43.56%55.31%17.31%22.69%
Meta-LSTM
43.44%60.60%16.70%26.06%
MAMLY48.7%63.11%16.49%19.29%
Meta-SGD
50.49%64.03%17.56%28.92%
TCML
55.71%68.88%--
Learning to CompareN57.02%71.07%--
Ours, similarity ensembleN55.2%68.8%

Ours, feature ensembleN55.2%70.1%




上一篇:LearningToCompare_ZSL

下一篇:LearningToCompare_python3

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...