Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BoyuanJiang/matching-networks-pytorch
Matching Networks for one shot learning
https://github.com/BoyuanJiang/matching-networks-pytorch
one-shot-learning
Last synced: 13 days ago
JSON representation
Matching Networks for one shot learning
- Host: GitHub
- URL: https://github.com/BoyuanJiang/matching-networks-pytorch
- Owner: BoyuanJiang
- Created: 2017-10-25T14:37:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T07:32:05.000Z (about 7 years ago)
- Last Synced: 2024-07-31T23:44:42.800Z (3 months ago)
- Topics: one-shot-learning
- Language: Python
- Homepage:
- Size: 5.93 MB
- Stars: 228
- Watchers: 7
- Forks: 67
- Open Issues: 7
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
- awesome-few-shot-meta-learning - code (PyTorch)
README
This is the pytorch implement of **[Matching Networks for One Shot Learning](https://arxiv.org/pdf/1606.04080.pdf)**
![architecture](https://github.com/BoyuanJiang/matching-networks-pytorch/blob/master/architecture.png)
## Train
If you want to train the model,simply run the code
```
python mainOmniglot.py
```You can set *fce = True* if you want use Full Context Embeddings.You can use the follow set in mainOmniglot.py for a 5-way one shot learning.
```
classes_per_set = 5
samples_per_class = 1
```## Result
After about 30 epoches,you can achieve about 97% accuracy on train set and 96% on val and test set.
![result](https://github.com/BoyuanJiang/matching-networks-pytorch/blob/master/result.png)## Acknowledgement
This work refer to [gitabcworld](https://github.com/gitabcworld/)'s implement,detail at[https://github.com/AntreasAntoniou/MatchingNetworks](https://github.com/AntreasAntoniou/MatchingNetworks).