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

大佬您好,我调了很久还是不能跑通。 #3

Open xielock opened 3 years ago

xielock commented 3 years ago

我用的pytorch1.7.1版本; 首先跑的时候遇到了第一个问题: 选区_099 我这个部分添加了.cpu()解决了,后面遇见了第二个问题

选区_100 对于这个问题,我修改了一下相应的数据类型解决了

选区_101 最后还报另一个错误?请问该如何修改,谢谢!!!!

选区_102

noobgrow commented 2 years ago

遇到一样的问题,请问你解决了吗 one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [3, 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). @xielock

xielock commented 2 years ago

遇到一样的问题,请问你解决了吗 one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [3, 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). @xielock

no,我放弃了