Runtime Error : Legacy autograd function with non-static forward method is deprecated - ssd 코드 보면서 생긴 에러
Runtime Error : Legacy autograd function with non-static forward method is deprecated and will be removed in 1.3. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)
실행 도중 코드에서 쓰고 있는 autograd가 너무 오래된 버전이라
새 autograd와 forward 형식을 쓰라고 계속 에러가 떴다.
밑에 답변을 보고 해결할 수 있었음
https://github.com/amdegroot/ssd.pytorch/issues/444
non-static forward method will be removed in 1.3 · Issue #444 · amdegroot/ssd.pytorch
Hi, the version of my pytorch is 1.3. and the python version is 3.6. when I run the code y = net(x) which is for the detection. the warning is arise: UserWarning: Legacy autograd function with non-...
github.com
output = self.detect ( ~~
또는 self.detect.apply(~~이렇게 되어 있는 함수를
with torch.no_grad() :
self.detect.forward(~~ 로 고치면 된다.
ssd & pytorch 관련 참고 :
https://github.com/miyamotok0105/pytorch_handbook/blob/master/chapter7/demo/section7_1.ipynb
GitHub - miyamotok0105/pytorch_handbook: pytorch_handbook
pytorch_handbook. Contribute to miyamotok0105/pytorch_handbook development by creating an account on GitHub.
github.com
https://github.com/amdegroot/ssd.pytorch/
GitHub - amdegroot/ssd.pytorch: A PyTorch Implementation of Single Shot MultiBox Detector
A PyTorch Implementation of Single Shot MultiBox Detector - GitHub - amdegroot/ssd.pytorch: A PyTorch Implementation of Single Shot MultiBox Detector
github.com
https://github.com/pyaf/SSD-face-detector
GitHub - pyaf/SSD-face-detector: A flask based web app which uses Single Shot Multibox Detector to detect human faces
A flask based web app which uses Single Shot Multibox Detector to detect human faces - GitHub - pyaf/SSD-face-detector: A flask based web app which uses Single Shot Multibox Detector to detect huma...
github.com