You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was getting a RuntimeWarning: overflow encountered in scalar negative for offset = -low * scale in dataset/randaugment.py:32:.
The reason is that low is of class 'numpy.uint8', offset assumes this datatype, leading to problems in cases where scale is a floating point number, e.g. scale=1.0805084745762712, low=2. This leads to a wrong offset calculation because of the overflow, e.g. with offset: 274.4491525423729.
The bug could be easily fixed with casting the type of low as in offset = -np.float64(low) * scale.
The text was updated successfully, but these errors were encountered:
I was getting a
RuntimeWarning: overflow encountered in scalar negative
foroffset = -low * scale
indataset/randaugment.py:32:
.The reason is that
low
is ofclass 'numpy.uint8'
,offset
assumes this datatype, leading to problems in cases wherescale
is a floating point number, e.g.scale=1.0805084745762712, low=2
. This leads to a wrong offset calculation because of the overflow, e.g. withoffset: 274.4491525423729
.The bug could be easily fixed with casting the type of
low
as inoffset = -np.float64(low) * scale
.The text was updated successfully, but these errors were encountered: