Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/istarjun/TapNet
Chainer Implementation of TapNet: Neural Network Augmented with Task-Adaptive Projection for Few-Shot Learning
https://github.com/istarjun/TapNet
Last synced: about 2 months ago
JSON representation
Chainer Implementation of TapNet: Neural Network Augmented with Task-Adaptive Projection for Few-Shot Learning
- Host: GitHub
- URL: https://github.com/istarjun/TapNet
- Owner: istarjun
- Created: 2019-05-12T15:53:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T02:47:45.000Z (about 5 years ago)
- Last Synced: 2024-07-31T23:45:09.833Z (4 months ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 56
- Watchers: 3
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-few-shot-meta-learning - code - official (Chainer)
README
# TapNet: Neural Network Augmented with Task-Adaptive Projection for Few-Shot Learning
Code for the ICML 2019 paper TapNet: Neural Network Augmented with Task-Adaptive Projection for Few-Shot Learning
## Dependencies
* This code is tested on Ubuntu 16.04 with Python 3.6 and chainer 5.20## Data
### miniImageNet
#Download and unzip "mini-imagenet.tar.gz" from Google Drive link [[mini-ImageNet](https://drive.google.com/file/d/1DvYd7LMa0zvlqTM8oBdCWwQSxpZdf_D5/view?usp=sharing)]#Place ``train.npz``, ``val.npz``, ``test.npz`` files in ``TapNet/miniImageNet_TapNet/data``
### tieredImageNet
#Download and unzip "tiered-imagenet.tar.gz" from Google Drive link [[tiered-ImageNet](https://drive.google.com/file/d/1zz7bAYus7EeoMokwUQlLc3OY_eoII8B7/view?usp=sharing)]#Place images ``.npz`` and labels ``.pkl`` files in ``TapNet/tieredImageNet_TapNet/data``
## Running the code
```
#For miniImageNet experimentcd /TapNet/miniImageNet_TapNet/scripts
python train_TapNet_miniImageNet.py --gpu {GPU device number}
--n_shot {n_shot}
--nb_class_train {number of classes in training}
--nb_class_test {number of classes in test}
--n_query_train {number of queries per class in training}
--n_query_test {number of queries per class in test}
--wd_rate {Weight decay rate}
#For tieredImageNet experimentcd /TapNet/tieredImageNet_TapNet/scripts
python train_TapNet_tieredImageNet.py --gpu {GPU device number}
--n_shot {n_shot}
--nb_class_train {number of classes in training}
--nb_class_test {number of classes in test}
--n_query_train {number of queries per class in training}
--n_query_test {number of queries per class in test}
--wd_rate {Weight decay rate}
```