Closed sxfduter closed 3 years ago
@mohan1914 hello ! Thanks for sharing code. I follow the steps of readme to install the environment and process cityspaces data. When I train, I report an error as shown above. Can you please help me how to resolve it?
I reinstalled the environment again, and there was no such problem.
It's great that it worked for you. Can I close the issue now?
Traceback (most recent call last): File "train.py", line 148, in
main()
File "train.py", line 144, in main
meta=meta)
File "/data/PycharmProjects/EfficientPS/mmdet/apis/train.py", line 112, in train_detector
meta=meta)
File "/data/PycharmProjects/EfficientPS/mmdet/apis/train.py", line 245, in _non_dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/mmcv/runner/runner.py", line 384, in run
epoch_runner(data_loaders[i], kwargs)
File "/home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/mmcv/runner/runner.py", line 283, in train
self.model, data_batch, train_mode=True, kwargs)
File "/data/PycharmProjects/EfficientPS/mmdet/apis/train.py", line 75, in batch_processor
losses = model(data)
File "/home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, *kwargs)
File "/home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(inputs[0], kwargs[0])
File "/home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, *kwargs)
File "/data/PycharmProjects/EfficientPS/mmdet/core/fp16/decorators.py", line 49, in new_func
return old_func(args, kwargs)
File "/data/PycharmProjects/EfficientPS/mmdet/models/efficientps/base.py", line 147, in forward
return self.forward_train(img, img_metas, kwargs)
File "/data/PycharmProjects/EfficientPS/mmdet/models/efficientps/efficientPS.py", line 205, in forward_train
proposal_list = self.rpn_head.get_bboxes(proposal_inputs)
File "/data/PycharmProjects/EfficientPS/mmdet/core/fp16/decorators.py", line 127, in new_func
return old_func(args, **kwargs)
File "/data/PycharmProjects/EfficientPS/mmdet/models/anchor_heads/anchor_head.py", line 276, in get_bboxes
scale_factor, cfg, rescale)
File "/data/PycharmProjects/EfficientPS/mmdet/models/anchor_heads/rpn_head.py", line 92, in get_bboxessingle
proposals, = nms(proposals, cfg.nms_thr)
File "/data/PycharmProjects/EfficientPS/mmdet/ops/nms/nms_wrapper.py", line 56, in nms
inds = nms_cuda.nms(dets_th, iou_thr)
RuntimeError: !dets.type().is_cuda() INTERNAL ASSERT FAILED at mmdet/ops/nms/src/nms_cpu.cpp:7, please report a bug to PyTorch. dets must be a CPU tensor (nms_cpu_kernel at mmdet/ops/nms/src/nms_cpu.cpp:7)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6d (0x7f17694182ad in /home/sun/anaconda3/envs/efficientPS_env/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: at::Tensor nms_cpu_kernel(at::Tensor const&, float) + 0x86f (0x7f16878d9b6f in /data/PycharmProjects/EfficientPS/mmdet/ops/nms/nms_cpu.cpython-37m-x86_64-linux-gnu.so)
frame #2: nms(at::Tensor const&, float) + 0xea (0x7f16878c43da in /data/PycharmProjects/EfficientPS/mmdet/ops/nms/nms_cpu.cpython-37m-x86_64-linux-gnu.so)
frame #3: + 0x3f3bb (0x7f16878863bb in /data/PycharmProjects/EfficientPS/mmdet/ops/nms/nms_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #4: + 0x3bc94 (0x7f1687882c94 in /data/PycharmProjects/EfficientPS/mmdet/ops/nms/nms_cuda.cpython-37m-x86_64-linux-gnu.so)