privateml icon indicating copy to clipboard operation
privateml copied to clipboard

“OverflowError: Python int too large to convert to C long” on 64-bit windows

Open WandiX opened this issue 6 years ago • 2 comments

Hi,

I tried to run the image analysis on 64-bit Windows. When the process goes to decode(), the overflow error arises. I changed map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q) to map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q, otypes=[np.float64]) The error goes away, but two warnings arise: tensor.py:102: RuntimeWarning: overflow encountered in exp tensor.py:81: RuntimeWarning: invalid value encountered in true_divide I tried to ignore the warnings, but the prediction results are not good (50% - 60% I guess). Any idea how to deal with?

Thanks!

WandiX avatar Apr 17 '18 08:04 WandiX

Hi,

I tried to run the image analysis on 64-bit Windows. When the process goes to decode(), the overflow error arises. I changed map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q) to map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q, otypes=[np.float64]) The error goes away, but two warnings arise: tensor.py:102: RuntimeWarning: overflow encountered in exp tensor.py:81: RuntimeWarning: invalid value encountered in true_divide I tried to ignore the warnings, but the prediction results are not good (50% - 60% I guess). Any idea how to deal with?

Thanks!

Excuse me, have you fixed the problem?

zerotas avatar Apr 18 '19 04:04 zerotas

Hi, I tried to run the image analysis on 64-bit Windows. When the process goes to decode(), the overflow error arises. I changed map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q) to map_negative_range = np.vectorize(lambda element: float(element) if element <= Q/2 else element - Q, otypes=[np.float64]) The error goes away, but two warnings arise: tensor.py:102: RuntimeWarning: overflow encountered in exp tensor.py:81: RuntimeWarning: invalid value encountered in true_divide I tried to ignore the warnings, but the prediction results are not good (50% - 60% I guess). Any idea how to deal with? Thanks!

Excuse me, have you fixed the problem?

No. I tried but I couldn't fix.

WandiX avatar Apr 21 '19 04:04 WandiX