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

How to tune parameters to avoid cost:nan? #14

Open
o0windseed0o opened this issue May 24, 2018 · 1 comment
Open

How to tune parameters to avoid cost:nan? #14

o0windseed0o opened this issue May 24, 2018 · 1 comment

Comments

@o0windseed0o
Copy link

Using our own data from EHR and default parameters of med2vec, the cost went nan in epoch 1. Which parameter should I adujst to avoid such things happen? Enhance L2 or set a bigger log_eps? We have in total over 100 thousand batches, do we need to set a bigger batch_size?

@mp2893
Copy link
Owner

mp2893 commented May 25, 2018

First you need to figure out where the NaN is coming from.
It could be coming from the model output (the predicted values), or the gradients.
But finding the source of NaN is not easy in Theano (refer to this page)
I would suggest you change the size of the mini batch from 2 to 100 or even 1000.
Hope this helps.
Ed

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