- Code explanation in Chinese. http://shamangary.logdown.com/posts/6424093
- Remove the one-hot inputs for Embedding layer and replace it by single value labels.
- There are two kinds labels: single value for center loss, and one-hot vector labels for softmax term.
- Every classes are visually seperated now :)
- Step.1 Change the flag of center loss inside TYY_mnist.py
isCenterloss = True
#isCenterloss = False
- Step.2 Run the file
KERAS_BACKEND=tensorflow python TYY_mnist.py
- Anaconda
- Keras
- Tensorflow
- Others: (install with anaconda)
conda install -c anaconda scikit-learn
conda install -c conda-forge matplotlib
- https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py
- https://github.com/keunwoochoi/keras_callbacks_example
- https://github.com/jxgu1016/MNIST_center_loss_pytorch
- http://kexue.fm/archives/4493/