The following error was reported during my running demo.py: RuntimeError: Legacy autograd function with non-static forward method is deprecated,
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.
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 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
)