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

NaN problem fix #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

NaN problem fix #3

wants to merge 1 commit into from

Conversation

aregic
Copy link

@aregic aregic commented Aug 14, 2017

The problem was the sharpening function in memory.py which had a division with no guarantee that the denominator is not zero.

I have tested it by starting to learn from a checkpoint which was very close to outputting NaNs (it always happened in a couple of hundred iterations) and with this fix it worked fine for 300k more iterations.

Of course the result of the loss function changed a little at first, so this is not a 100% guarantee, but I'm confident this patch removes one possibility for the NaN problem.

The problem was the sharpening function in memory.py which had a division with no guarantee that the denominator is not zero.

I have tested it by starting to learn from a checkpoint which was very close to outputting NaNs (it always happened in a couple of hundred iterations) and with this fix it worked fine for 300k more iterations.

Of course the result of the loss function changed a little at first, so this is not a 100% guarantee, but I'm confident this patch removes one possibility for the NaN problem.
Copy link
Owner

@camigord camigord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fix and sorry for the huge delay... I would like to approve the pull request, but I would like to keep the current README given that the problem may still not be solved. Could you send a new pull request with only the changes in memory.py?

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

Successfully merging this pull request may close these issues.

2 participants