TRAILab / CaDDN

Categorical Depth Distribution Network for Monocular 3D Object Detection (CVPR 2021 Oral)
Apache License 2.0
359 stars 62 forks source link

allow_unreachable=True) # allow_unreachable flag RuntimeError: derivative for to_sparse is not implemented #67

Closed rockywind closed 2 years ago

rockywind commented 2 years ago

When I added sparse conv to CaDDN, the error is below.

Traceback (most recent call last): File "train.py", line 215, in main() File "train.py", line 185, in main merge_all_iters_to_one_epoch=args.merge_all_iters_to_one_epoch File "/newnfs/zzwu/08_3d_code/CaDDN_CenterPoint/tools/train_utils/train_utils.py", line 95, in train_model dataloader_iter=dataloader_iter File "/newnfs/zzwu/08_3d_code/CaDDN_CenterPoint/tools/train_utils/train_utils.py", line 42, in train_one_epoch loss.backward() File "/home/CN/zizhang.wu/anaconda3/envs/CaDDN_CenterPoint/lib/python3.7/site-packages/torch/tensor.py", line 221, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph) File "/home/CN/zizhang.wu/anaconda3/envs/CaDDN_CenterPoint/lib/python3.7/site-packages/torch/autograd/init.py", line 132, in backward allow_unreachable=True) # allow_unreachable flag RuntimeError: derivative for to_sparse is not implemented

codyreading commented 2 years ago

This doesn't look like a CaDDN specific error, rather an error with the library you have added. Looks like the issue is in the to_sparse function.

rockywind commented 2 years ago

Thanks a lot