ssd.pytorch icon indicating copy to clipboard operation
ssd.pytorch copied to clipboard

Use new-style autograd function with static forwarding method

Open vladoski opened this issue 4 years ago • 2 comments

Hi guys, I'm trying this code on torch==1.6.0 but when I'm running live.py I get this:

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)

Of course this doesn't happen if I'm using torch==1.2.0 or below.

If you have time I suggest to use static methods for autograd forwarding as the non static is deprecated.

vladoski avatar Jul 30 '20 14:07 vladoski

@vladoski Hi dude, I have fixed what you said, but i don't know how to show it....

Zhaosiliang avatar Oct 26 '20 13:10 Zhaosiliang

@ayukat1016 PyTorch1.5.0 support new-style autograd function

Try 👆 in #444 It works well with Pytorch1.7.0

Abonnen avatar Nov 05 '20 14:11 Abonnen