second.pytorch
second.pytorch copied to clipboard
TypeError: Object of type ndarray is not JSON serializable
Met this problem when run the train command: train with single GPU python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir=/path/to/model_dir
Traceback (most recent call last): File "./pytorch/train.py", line 306, in train ret_dict = net_parallel(example_torch) File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/root/second.pytorch/second/pytorch/models/voxelnet.py", line 363, in forward preds_dict = self.network_forward(voxels, num_points, coors, batch_size_dev) File "/root/second.pytorch/second/pytorch/models/voxelnet.py", line 332, in network_forward voxel_features, coors, batch_size) File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/root/second.pytorch/second/pytorch/models/middle.py", line 203, in forward ret = self.middle_conv(ret) File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/root/anaconda3/lib/python3.7/site-packages/spconv/modules.py", line 130, in forward input = module(input) File "/root/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/root/anaconda3/lib/python3.7/site-packages/spconv/conv.py", line 177, in forward use_hash=self.use_hash) File "/root/anaconda3/lib/python3.7/site-packages/spconv/ops.py", line 93, in get_indice_pairs stride, padding, dilation, out_padding, int(subm), int(transpose), int(use_hash)) RuntimeError: /root/second.pytorch/second/spconv/src/spconv/indice.cu 165 cuda execution failed with error 8 invalid device function prepareSubMHashKernel failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./pytorch/train.py", line 663, in
Did you slove this problem?
I had the same problem, but in my case the Memory of the GPU was completely full. Training on a RTX 2070 solved the problem
@simaker have you changed the batch size or anything else? I met the same error using RTX 2070. and by using nvidia-smi I saw the memory is used up. Could you share your runtime version of cuda, pytorch etc? Thank you~