Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: stack expects a non-empty TensorList #16

Open
xiaotiancai899 opened this issue May 29, 2023 · 4 comments
Open

RuntimeError: stack expects a non-empty TensorList #16

xiaotiancai899 opened this issue May 29, 2023 · 4 comments

Comments

@xiaotiancai899
Copy link

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!!!!

@ngoductuanlhp
Copy link
Collaborator

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

@xiaotiancai899
Copy link
Author

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!!!!

@ngoductuanlhp
Copy link
Collaborator

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.

@xiaotiancai899
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants