Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The following error was reported during my running demo.py: RuntimeError: Legacy autograd function with non-static forward method is deprecated, #72

Open
smallsun1122 opened this issue Sep 25, 2020 · 8 comments

Comments

@smallsun1122
Copy link

No description provided.

@q838458640
Copy link

I had the same problem, probably because the version of the Torch was too high, but I couldn't fix it.I wonder if you have solved this problem?

@smallsun1122
Copy link
Author

smallsun1122 commented Apr 19, 2021 via email

@q838458640
Copy link

感谢您

@WeiCUI6
Copy link

WeiCUI6 commented May 18, 2021

I also had the same issue, can I ask how do you fix the problems? I will really appreciate it!

@berkanttubi
Copy link

Any answer??

@berkanttubi
Copy link

add @staticmethod to the beginning of the function that error has been occured.

@funykatebird
Copy link

I had the same problem, probably because the version of the Torch was too high, but I couldn't fix it.I wonder if you have solved this problem?
我也遇到了同样的问题,请问解决了吗?

@wengshihao
Copy link

you can easily solve this problem by:
do changes in face_ssd.py:

output = self.detect(
                  face_loc.view(face_loc.size(0), -1, 4),         # loc preds
                  self.softmax(face_conf.view(face_conf.size(0), -1, self.num_classes)), # conf preds
                  self.priors.type(type(x.data))                  # default boxes
                )

to the below code:

output = self.detect.forward(
                  face_loc.view(face_loc.size(0), -1, 4),         # loc preds
                  self.softmax(face_conf.view(face_conf.size(0), -1, self.num_classes)), # conf preds
                  self.priors.type(type(x.data))                  # default boxes
                )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants