auroua / InsightFace_TF

Insight Face on TensorFlow
MIT License
698 stars 251 forks source link

error nan loss #12

Closed damvantai closed 6 years ago

damvantai commented 6 years ago

when i use arcface loss in mnist, my error loss nan ? do you test your code accuracy ?

auroua commented 6 years ago

I have not test the code on mnist. I think you can try the following method to make arcface work probably on mnist.

  1. Try to use small network.
  2. The 50-layer network use lots of batch norm layer, but the mnist dataset only contain 10 category and the variance in each category is not large enough to fit so many batch norm layers, so it will cause the nan. You should to reduce the number of batch norm layers.
damvantai commented 6 years ago

i am using small neural network, but loss error? nan https://github.com/damvantai/tensorflow-sphereface-asoftmax/blob/master/test_mnist.py

damvantai commented 6 years ago

i use sphereface loss is right but arcface loss ? error

seanM29 commented 5 years ago

i meet same problem on mnist(resnet 50, arcface loss), have you solved this problem? @damvantai