zhoulukuan:

It means I need to check the bbooverlaps results?


Yes. I’m not sure what tensors are passed to this method, but the calculation might be wrong for “unexpected” tensors or you might run into an overflow.



 zhoulukuan:

How to understand wrong results, such as NAN? Is there any other situation？


NaN values can be created in various ways. Based on the posted tensor value, it doesn’t seem that you are running into NaNs but invalid v alues.



 zhoulukuan:

Besides, when I set a breakpoint, I found that once the above error occurs, all variables will become Unable to get repr for <class 'torch.Tensor'> , cannot be viewed, what should I do?


I’m not sure which debugger you are using, but you could add assert statements (or conditions) and print the desired values.