withtimesgo1115 / gradCAM-YOLOv3-pytorch

This repository contains key scripts for implementing gradient CAM algorithm for YOLO v3 model. The codes has been tested on pytorch 1.7.1.
MIT License
24 stars 6 forks source link

大佬,您好,这个问题困扰我好几天了,求回复 #4

Open zhangchi621 opened 2 years ago

zhangchi621 commented 2 years ago

代码在运行到scores.backward()这一行的时候,报了这个错误RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [5, 1]], which is output 0 of SliceBackward, is at version 2; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). 怎么解决呢

noobgrow commented 2 years ago

你好,我也遇到了一样的问题,能交流一下吗,我的qq 1092850034 @zhangchi621 @withtimesgo1115

YunXiaoD commented 2 years ago

你好,问一下大佬们,问题解决了吗?

zhangchi621 commented 2 years ago

改一下nms中的这一行试试 x[..., 5:] = x[..., 5:].clone() x[..., 4:5].clone() # conf = obj_conf cls_conf

------------------ 原始邮件 ------------------ 发件人: "withtimesgo1115/gradCAM-YOLOv3-pytorch" @.>; 发送时间: 2021年11月18日(星期四) 下午4:17 @.>; @.**@.>; 主题: Re: [withtimesgo1115/gradCAM-YOLOv3-pytorch] 大佬,您好,这个问题困扰我好几天了,求回复 (Issue #4)

你好,问一下大佬们,问题解决了吗?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

pogcode commented 1 year ago

改一下nms中的这一行试试 x[..., 5:] = x[..., 5:].clone() x[..., 4:5].clone() # conf = obj_conf cls_conf ------------------ 原始邮件 ------------------ 发件人: "withtimesgo1115/gradCAM-YOLOv3-pytorch" @.>; 发送时间: 2021年11月18日(星期四) 下午4:17 @.>; @.**@.>; 主题: Re: [withtimesgo1115/gradCAM-YOLOv3-pytorch] 大佬,您好,这个问题困扰我好几天了,求回复 (Issue #4) 你好,问一下大佬们,问题解决了吗? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

谢谢解答,成功解决了这个问题