Giter VIP home page Giter VIP logo

Comments (7)

Androsimus avatar Androsimus commented on May 22, 2024 1

@GranMin besides, if you use script convert_train_binary_tfrecord.py for data preprocessing, you must enforce all dir names of your N classes are strictly within interval [0,...,N-1], because dir names will be further used as labels in Softmax loss.

from arcface-tf2.

kritikaksu avatar kritikaksu commented on May 22, 2024

Hey..The same problem was with me then i realized that my input image size was not 112x112. when i have re-scaled them to 112x112 then Nan Values have been gone..

from arcface-tf2.

GranMin avatar GranMin commented on May 22, 2024

hello,My image size is 96x96, and I changed the input of the model, just as shown blow. But my loss is still nan. Do you have any idea about it?
1

from arcface-tf2.

Androsimus avatar Androsimus commented on May 22, 2024

@GranMin
Hi!
In a dataset.py size of input image is hardcoded in function _transform_images. Maybe this is the reason of nans.

from arcface-tf2.

GranMin avatar GranMin commented on May 22, 2024

@Androsimus thankyou, I find my problem that I labeled my dataset by [1,...,N] rather than [0,...,N-1]. So I got nan. I correct it and then it runs well.
By the way, when I changed optimizer to Adam, model resnet50 sometimes achieve accuracy of 0.9, but sometimes sticks in 0.3, do you have any idea about it?

from arcface-tf2.

Androsimus avatar Androsimus commented on May 22, 2024

@GranMin if you use identical hyperparameters and datasets, then I can hardly imagine appropriate reasons.
But if you use different learning rates for example or something else, then I can try to explain this.

from arcface-tf2.

GranMin avatar GranMin commented on May 22, 2024

@Androsimus thanks.I had some problem with the understanding of tf.optimizers, I changed the hyperparameters as somebody said, and it works. Best wishes!

from arcface-tf2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.