Closed Z-Lee-corder closed 2 years ago
Could you provide me with pip freeze
and the whole stack trace?
I use the following version: python=3.6 pytorch=1.5.0 and cuda 10.1 Are the versions of these packages too low to cause this error?
I have used the same environment as you mentioned, but the error still occurred, the whole stack trace is following: Traceback (most recent call last): File "/media/lizheng/datum/codes/PDV/tools/train_utils/train_utils.py", line 93, in train_model dataloader_iter=dataloader_iter File "/media/lizheng/datum/codes/PDV/tools/train_utils/train_utils.py", line 38, in train_one_epoch loss, tb_dict, disp_dict = model_func(model, batch) File "/media/lizheng/datum/codes/PDV/pcdet/models/init.py", line 42, in model_func ret_dict, tb_dict, disp_dict = model(batch_dict) File "/home/lizheng/anaconda3/envs/pcdet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, *kwargs) File "/media/lizheng/datum/codes/PDV/pcdet/models/detectors/pdv.py", line 11, in forward batch_dict = cur_module(batch_dict) File "/home/lizheng/anaconda3/envs/pcdet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(input, **kwargs) File "/media/lizheng/datum/codes/PDV/pcdet/models/roi_heads/pdv_head.py", line 252, in forward positional_input = self.get_positional_input(batch_dict['points'], batch_dict['rois'], local_roi_grid_points) File "/media/lizheng/datum/codes/PDV/pcdet/models/roi_heads/pdv_head.py", line 213, in get_positional_input return_centroid=self.pool_cfg.ATTENTION.POSITIONAL_ENCODER == 'density_centroid') File "/media/lizheng/datum/codes/PDV/pcdet/utils/density_utils.py", line 80, in find_num_points_per_part_multi points_out_of_range = ((xyz_local_grid < 0) | (xyz_local_grid >= grid_size) | (xyz_local_grid.isnan())).any(-1).flatten() AttributeError: 'Tensor' object has no attribute 'isnan' python-BaseException
Have you tried running the provided tests in PDV/tests
, specifically this test suite?
https://github.com/TRAILab/PDV/blob/main/tests/utils/test_density_utils.py#L120-L279
And to confirm, you have the same environment as follows?
If it still doesn't work, I would suggest trying to run the code with the provided docker image.
I also saw another Github issue that may help you solve your problem (https://github.com/yuantn/MI-AOD/issues/2#issuecomment-799366343). The code change seemed to work fine on my end, but I haven't tested this enough to guarantee that it will also work.
Thank you!I have updated the version of pytorch to 1.7. The issues have been solved.
Hi, I tried to tun your source code,but the following error occurred:“AttributeError: 'Tensor' object has no attribute 'isnan” The wrong sentence is “points_out_of_range = ((xyz_local_grid < 0) | (xyz_local_grid >= grid_size) | (xyz_local_grid.isnan())) .any(-1).flatten()”in the folder “pcdet/utils/density_utils.py".
What is the cause and how to improve it?