https://github.com/shunk031/chainer-center-loss
Implementation of Center Loss in Chainer
https://github.com/shunk031/chainer-center-loss
center-loss chainer chainerv2
Last synced: 3 months ago
JSON representation
Implementation of Center Loss in Chainer
- Host: GitHub
- URL: https://github.com/shunk031/chainer-center-loss
- Owner: shunk031
- Created: 2017-07-19T15:33:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-02T05:28:04.000Z (over 7 years ago)
- Last Synced: 2025-04-30T02:38:22.837Z (6 months ago)
- Topics: center-loss, chainer, chainerv2
- Language: Python
- Homepage:
- Size: 222 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chainer Center Loss
Implementation of [Center Loss](https://link.springer.com/chapter/10.1007/978-3-319-46478-7_31) in Chainer.
## Requirements
- Python 3.5.1
- Chainer 2.0.0
- CuPy 1.0.0 (if use GPU)
- Matplotlib
## How to train
* with CPU and use center loss
```shell
python train_mnist.py --batchsize 32 --epoch 20 --centerloss
```
* with GPU and use center loss
```shell
python train_mnist.py --batchsize 32 --epoch 20 --gpu 0 --centerloss
```
## Visualize the result
* MNIST, Softmax Loss + Center Loss
The white dots denote 10 class centers of deep features.

* MNIST, only Softmax Loss

## Reference
- [Wen, Yandong, et al. "A discriminative feature learning approach for deep face recognition." European Conference on Computer Vision. Springer International Publishing, 2016.](https://link.springer.com/chapter/10.1007/978-3-319-46478-7_31)