M3D-RPN
M3D-RPN copied to clipboard
TypeError: zip argument #1 must support iteration
Did anyone get the same problem? Or did anyone has ideas?
File "scripts/train_rpn_3d.py", line 196, in <module>
main(sys.argv[1:])
File "scripts/train_rpn_3d.py", line 122, in main
cls, prob, bbox_2d, bbox_3d, feat_size = rpn_net(images)
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 156, in forward
return self.gather(outputs, self.output_device)
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 168, in gather
return gather(outputs, output_device, dim=self.dim)
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 68, in gather
res = gather_map(outputs)
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
TypeError: zip argument #1 must support iteration```
Did anyone get the same problem? Or did anyone has ideas?
File "scripts/train_rpn_3d.py", line 196, in <module> main(sys.argv[1:]) File "scripts/train_rpn_3d.py", line 122, in main cls, prob, bbox_2d, bbox_3d, feat_size = rpn_net(images) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__ result = self.forward(*input, **kwargs) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 156, in forward return self.gather(outputs, self.output_device) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 168, in gather return gather(outputs, output_device, dim=self.dim) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 68, in gather res = gather_map(outputs) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(*outputs))) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(*outputs))) File "/home/xxx/miniconda3/envs/Monocular3D/lib/python3.7/site-packages/torch/nn/parallel/scatter_gather.py", line 63, in gather_map return type(out)(map(gather_map, zip(*outputs))) TypeError: zip argument #1 must support iteration```
i meet the same question,have you solved it?thanks
Hello, I found this is a problem caused by the multi-gpu defined in line 69 of lib/core.py
# multi-gpu
network = torch.nn.DataParallel(network)
I comment this line to switch off the parellel computing
And then fixed a few issues in RPN_3d_loss caused by problems in converting of cuda tensor to numpy format
Then the training code works