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

RuntimeWarning: overflow encountered in exp in training #64

Open
huwjenkins opened this issue Aug 27, 2020 · 2 comments
Open

RuntimeWarning: overflow encountered in exp in training #64

huwjenkins opened this issue Aug 27, 2020 · 2 comments

Comments

@huwjenkins
Copy link

Hi,

I see the following message printed to stderr when training. RuntimeWarning: overflow encountered in exp. This is reproducible with Topaz 0.2.4 on the test dataset.

Using numpy.seterr identifies this occurs here for scores < -88.7228 as then np.exp(-score) overflows float32.

y_hat = 1.0/(1.0 + np.exp(-scores))

Is this an issue? Thanks.

@tbepler
Copy link
Owner

tbepler commented Aug 28, 2020

Thanks for pointing this out. It should be fixed, but won't cause any problems other than the annoying warning.

@huwjenkins
Copy link
Author

Thanks for confirming it doesn't cause any problems! Fortunately the warning is only printed the first time it happens.

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

No branches or pull requests

2 participants