RAISR icon indicating copy to clipboard operation
RAISR copied to clipboard

encountered an OverflowError when running train.py

Open edcrfvedcrfv opened this issue 8 years ago • 3 comments

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

edcrfvedcrfv avatar Nov 08 '17 09:11 edcrfvedcrfv

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!

EasonOnFire avatar Nov 13 '17 13:11 EasonOnFire

😂 Need your PR~ @EasonOnFire

MKFMIKU avatar Nov 13 '17 14:11 MKFMIKU

Ok let me try..

EasonOnFire avatar Nov 14 '17 02:11 EasonOnFire