ISBNet icon indicating copy to clipboard operation
ISBNet copied to clipboard

RuntimeError: stack expects a non-empty TensorList

Open xiaotiancai899 opened this issue 2 years ago • 4 comments

Due to the version of GPU, I have to set the batch_size=1, However, it cause an error when training at the epoch 48 out of 120. 'RuntimeError: stack expects a non-empty TensorList' I am training the ScanNet200 dataset using this network. Any ideas about this? Thanks in advance!!!!

xiaotiancai899 avatar May 29 '23 05:05 xiaotiancai899

Please give me more details: which line of code and which file, or the full traceback of this error?

ngoductuanlhp avatar May 30 '23 13:05 ngoductuanlhp

Please give me more details: which line of code and which file, or the full traceback of this error?

Traceback (most recent call last): File "tools/train.py", line 307, in main() File "tools/train.py", line 298, in main train(epoch, model, optimizer, scheduler, scaler, train_loader, cfg, logger, writer) File "tools/train.py", line 73, in train loss, log_vars = model(batch, return_loss=True, epoch=epoch - 1) File "/home/clinton/anaconda3/envs/isbnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/isbnet.py", line 219, in forward return self.forward_train(**batch, epoch=epoch) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/util/utils.py", line 172, in wrapper return func(*new_args, **new_kwargs) File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/isbnet.py", line 251, in forward_train voxel_coords_float, voxel_instance_labels, voxel_semantic_labels, label_shift=self.label_shift File "/mnt/d/student/Documents/software/wsl/isbnet/isbnet-master/isbnet-master/isbnet/model/model_utils.py", line 552, in get_instance_info instance_box = torch.stack(instance_box, dim=0) # N, 6 RuntimeError: stack expects a non-empty TensorList

Any ideas? Thanks very much!!!!

xiaotiancai899 avatar May 31 '23 07:05 xiaotiancai899

It means that your input point cloud does not contain any foreground instance, leading to an empty list. You may have cropped too many points in the preprocessing step. One solution is that you can check these ambiguous cases and excl;lude them during training.

ngoductuanlhp avatar May 31 '23 18:05 ngoductuanlhp

It means that your input point cloud does not contain any foreground instance, leading to an empty list. You may have cropped too many points in the preprocessing step. One solution is that you can check these ambiguous cases and excl;lude them during training.

I was following the steps shown as data preprocessing, so I have not cropped points.

xiaotiancai899 avatar Jun 01 '23 05:06 xiaotiancai899