google / automl

Google Brain AutoML
Apache License 2.0
6.18k stars 1.45k forks source link

UserWarning: __floordiv__ is deprecated && assert (boxes1[:, 2:] >= boxes1[:, :2]).all() #1185

Open chenqq1 opened 1 year ago

chenqq1 commented 1 year ago

When I use the Lion_pytorch, it comes out "UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). max_size = (max_size + (stride - 1)) // stride * stride" After a few iterations of training,an AssertionError is reported: assert (boxes1[:, 2:] >= boxes1[:, :2]).all() . My dataset is fine, because there are no errors when I train with other optimizers. How do I solve it?