EvelynFan / FaceFormer

[CVPR 2022] FaceFormer: Speech-Driven 3D Facial Animation with Transformers
MIT License
790 stars 134 forks source link

Fix UserWarning when using floor div #71

Open Clarivy opened 1 year ago

Clarivy commented 1 year ago

I got a warning in this line. I encountered this warning when torch >= 1.9.0 .

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')