GAP-LAB-CUHK-SZ / Total3DUnderstanding

Implementation of CVPR'20 Oral: Total3DUnderstanding: Joint Layout, Object Pose and Mesh Reconstruction for Indoor Scenes from a Single Image
MIT License
422 stars 50 forks source link

Bug on index device #54

Open yankeesong opened 1 year ago

yankeesong commented 1 year ago

I got the following error when trying to run the demo code. I didn't change anything. Please help. Thanks!

Traceback (most recent call last): File "/home/ryanrzzhang/文档/yankesong/Total3DUnderstanding/main.py", line 38, in demo.run(cfg) File "/home/ryanrzzhang/文档/yankesong/Total3DUnderstanding/demo.py", line 147, in run est_data = net(data) File "/home/ryanrzzhang/anaconda3/envs/Total3DUnderstanding/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, kwargs) File "/home/ryanrzzhang/文档/yankesong/Total3DUnderstanding/models/total3d/modules/network.py", line 95, in forward meshoutput, , , , _, out_faces = self.mesh_reconstruction(data['patch'], data['cls_codes']) File "/home/ryanrzzhang/anaconda3/envs/Total3DUnderstanding/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/home/ryanrzzhang/anaconda3/envs/Total3DUnderstanding/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 169, in forward return self.module(inputs[0], kwargs[0]) File "/home/ryanrzzhang/anaconda3/envs/Total3DUnderstanding/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/ryanrzzhang/文档/yankesong/Total3DUnderstanding/models/total3d/modules/mesh_reconstruction.py", line 209, in forward current_faces[batch_id][sphere_edge2face[rm_edges].sum(0).type(torch.bool), :] = 1 RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

skcskc7 commented 4 months ago

Did you solve this error? I encounter same issue.