DAIN icon indicating copy to clipboard operation
DAIN copied to clipboard

"Legacy autograd function with non-static forward method is deprecated. "

Open miltosc opened this issue 4 years ago • 3 comments

Hello!

when i run "CUDA_VISIBLE_DEVICES=0 python3 demo_MiddleBury.py" i get the following error

"Legacy autograd function with non-static forward method is deprecated. " RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)

Please help. Thanks in advance.

miltosc avatar May 02 '20 20:05 miltosc

It might be the mismatch of pytorch version, check if you are using pytorch 1.0.

baowenbo avatar May 04 '20 09:05 baowenbo

@miltosc Degrading your pytorch version is not a good idea. I have the save issue. According to the nvidia flownet git issue , you should update correlation.py, or manually add staticmethod in this file.

DavieHR avatar Jan 27 '21 03:01 DavieHR

@miltosc I have also encountered the same problem. Thank @DavieHR for the solution in flownet2-pytorch!

Avery-xu avatar Apr 07 '21 14:04 Avery-xu