Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cost_train_ma value #8

Open
KwonSangHyun opened this issue Aug 8, 2017 · 1 comment
Open

cost_train_ma value #8

KwonSangHyun opened this issue Aug 8, 2017 · 1 comment

Comments

@KwonSangHyun
Copy link

I wonder why set the initial value of "cost_train_ma" to -np.log(1 / float(num_classes) + 1e-9)

@RobRomijnders
Copy link
Owner

For a classification problem, with a cross entropy cost function and trained with Maximum Likelihood Estimation, you can calculate the cost function for a random output. That is -np.log(1 / float(num_classes)
The 1E-9 is to escape numerical errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants