SCZwangxiao / RTQ-MM2023

ACM Multimedia 2023 (Oral) - RTQ: Rethinking Video-language Understanding Based on Image-text Model
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

`RuntimeWarning: overflow encountered in scalar negative` #2

Closed SCZwangxiao closed 7 months ago

SCZwangxiao commented 9 months ago

This warning empirically does not affect the baseline results. It appears during my whole research progress. I think it might be related to the data augmentation, and I will try to fix it to see if we can get better results.

SCZwangxiao commented 7 months ago

The root cause is the overflow caused by np.uint8. Specifically, in L40 of the following code: https://github.com/SCZwangxiao/RTQ-MM2023/blob/ab5aaeb75e1aadd73e4f29ab57dfac23846260b4/lavis/processors/randaugment.py#L25-L45

The parameter low is of type np.uint8, offset = -low * scale will cause an overflow since it cannot represent a negative number.

This issue has been fixed in commit

SCZwangxiao commented 7 months ago

This bug does not affect performance, because low is 0 for most of the sample, in which there is no overflow.