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

encountered an OverflowError when running train.py #5

Open
edcrfvedcrfv opened this issue Nov 8, 2017 · 3 comments
Open

encountered an OverflowError when running train.py #5

edcrfvedcrfv opened this issue Nov 8, 2017 · 3 comments

Comments

@edcrfvedcrfv
Copy link

I've add the line in the other issue and then i run the train.py. There i get an OverflowError: cannot convert float infinity to integer in the line:
File "/home/hatai/code/tensorflow/picZip/RAISR-master/model/hashTable.py", line 29, in hashTable
return int(angle),int(strength),int(coherence)
Anyone knows how to fix it? Thanks a lot

@EasonOnFire
Copy link
Contributor

EasonOnFire commented Nov 13, 2017

I'm facing the same error when training using python2.7. Don't know if the python version matters. I'll be back if I figure it out.

Update:

After debuging, I find the code in Line 26 in model/hashTable.py should be
strength = np.floor(strength/(1.0/Qstrenth)-1)
otherwise '1/Qstrenth' equals 0 when the type of 'Qstrenth' is int.
But new error occurs, so maybe I'm mistake about the meaning of this part. @edcrfvedcrfv

Update:

There is a repeatly used variable 't' in Line47&53 in train.py. By changing one of these, I finally finished training!

@MKFMIKU
Copy link
Owner

MKFMIKU commented Nov 13, 2017

😂 Need your PR~ @EasonOnFire

@EasonOnFire
Copy link
Contributor

Ok let me try..

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

3 participants