Banconxuan / RTM3D

The official PyTorch Implementation of RTM3D and KM3D for Monocular 3D Object Detection
MIT License
454 stars 85 forks source link

loss['coor_loss']无法反向传播 #27

Open yuguangs opened 3 years ago

yuguangs commented 3 years ago

您好,在我按照您的步骤训练时出现了如下错误: RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 32, 1]], which is output 0 of IndexPutBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

当我去掉 loss['coor_loss'].mean()*coor_weight 这句代码时就可以正常训练了,请问这是什么原因呢

fgqile commented 3 years ago

i also have the problem, and i do this as you say. now it works. But i am stll trobuled by this problem. i have no idea about it. The error i encountered can be seen in the picture below. image