when I train pointpillars(using Kitti), train is normal, but when val, it will goes wrong like this, I guess that self.batch_processsor() function has some bug in val, please check it.
Traceback (most recent call last):
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1664, in
main()
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/ljt/Desktop/Det3D_local/tools/train.py", line 137, in
main()
File "/home/ljt/Desktop/Det3D_local/tools/train.py", line 132, in main
logger=logger,
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/apis/train.py", line 327, in train_detector
trainer.run(data_loaders, cfg.workflow, cfg.total_epochs, local_rank=cfg.local_rank)
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 536, in run
epoch_runner(data_loaders[i], self.epoch, kwargs)
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 403, in train
self.model, data_batch, train_mode=False, kwargs
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 374, in batch_processor_inline
return model(example, return_loss=False)
File "/home/ljt/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/ljt/Desktop/Det3D_local/det3d/models/detectors/point_pillars.py", line 54, in forward
return self.bbox_head.predict(example, preds, self.test_cfg)
File "/home/ljt/Desktop/Det3D_local/det3d/models/bbox_heads/mg_head.py", line 775, in predict
meta_list,
File "/home/ljt/Desktop/Det3D_local/det3d/models/bbox_heads/mg_head.py", line 1046, in get_task_detections
) ^ dir_labels.bool()
AttributeError: 'Tensor' object has no attribute 'bool'
when I train pointpillars(using Kitti), train is normal, but when val, it will goes wrong like this, I guess that self.batch_processsor() function has some bug in val, please check it.
Traceback (most recent call last): File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1664, in
main()
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/ljt/pycharm-community-2018.2.8/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/ljt/Desktop/Det3D_local/tools/train.py", line 137, in
main()
File "/home/ljt/Desktop/Det3D_local/tools/train.py", line 132, in main
logger=logger,
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/apis/train.py", line 327, in train_detector
trainer.run(data_loaders, cfg.workflow, cfg.total_epochs, local_rank=cfg.local_rank)
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 536, in run
epoch_runner(data_loaders[i], self.epoch, kwargs)
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 403, in train
self.model, data_batch, train_mode=False, kwargs
File "/home/ljt/Desktop/Det3D_local/det3d/torchie/trainer/trainer.py", line 374, in batch_processor_inline
return model(example, return_loss=False)
File "/home/ljt/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/ljt/Desktop/Det3D_local/det3d/models/detectors/point_pillars.py", line 54, in forward
return self.bbox_head.predict(example, preds, self.test_cfg)
File "/home/ljt/Desktop/Det3D_local/det3d/models/bbox_heads/mg_head.py", line 775, in predict
meta_list,
File "/home/ljt/Desktop/Det3D_local/det3d/models/bbox_heads/mg_head.py", line 1046, in get_task_detections
) ^ dir_labels.bool()
AttributeError: 'Tensor' object has no attribute 'bool'