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
{{ message }}
This repository was archived by the owner on May 1, 2025. It is now read-only.
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.