-
Notifications
You must be signed in to change notification settings - Fork 729
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
Comments
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? |
同学,你好,时间太久了,我有点忘记了,我在网上找了一些解决办法,看能不能帮到你,这些解决办法我看着有点熟悉 ,可能是之前用过的,希望可以帮到你。
…------------------ 原始邮件 ------------------
发件人: "Tencent/FaceDetection-DSFD" ***@***.***>;
发送时间: 2021年4月19日(星期一) 晚上8:27
***@***.***>;
抄送: "small ***@***.******@***.***>;
主题: Re: [Tencent/FaceDetection-DSFD] The following error was reported during my running demo.py: RuntimeError: Legacy autograd function with non-static forward method is deprecated, (#72)
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?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
感谢您 |
I also had the same issue, can I ask how do you fix the problems? I will really appreciate it! |
Any answer?? |
add @staticmethod to the beginning of the function that error has been occured. |
|
you can easily solve this problem by: 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
) |
No description provided.
The text was updated successfully, but these errors were encountered: