Skip to content

Modification of SoftMax layer to distribute features on a hypersphere tensorflow v 1.x and 2.0

License

Notifications You must be signed in to change notification settings

christk1/MSH_tensorflow_keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modification of SoftMax layer to distribute features on a hypersphere

Tutorial: Medium Story

VGG16 Training using MNIST dataset to show the difference in feature PCA visualization between SoftMax and modified SoftMax.

Versions for Tensorflow 1.14 and 2.0

Contents:

  1. SoftMax training
  2. modified SoftMax training
  3. fine-tuning of SoftMax with modified SoftMax
  4. Tensorboard visualizations
Tensorflow 1.14:
python3 mnist.py

Visualization of scalars and features using: tensorboard --logdir path/to/logs_mnist

Tensorflow 2.0:
python3 mnist.py

Visualization of scalars using: tensorboard --logdir path/to/logs_mnist

For feature visualization upload the two .tsv files generated under "logs_mnist" directory to Embedding Projector

2D Feature visualization(PCA) with SoftMax training 2D Feature visualization(PCA) with modified SoftMax training

Resources

  • ArcFace: Additive Angular Margin Loss for Deep Face Recognition paper
  • Official implementation of deepinsight/insightface on github

About

Modification of SoftMax layer to distribute features on a hypersphere tensorflow v 1.x and 2.0

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages