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:cannot unsqueezze empty tensor #5

Open
Yealdor opened this issue Jan 10, 2021 · 0 comments
Open

RuntimeError:cannot unsqueezze empty tensor #5

Yealdor opened this issue Jan 10, 2021 · 0 comments

Comments

@Yealdor
Copy link

Yealdor commented Jan 10, 2021

in training process,I got error below:
Traceback (most recent call last):
File "/media/liye/volume0/Ubuntu/PythonProject/easy-fpn.pytorch/train.py", line 150, in
main()
File "/media/liye/volume0/Ubuntu/PythonProject/easy-fpn.pytorch/train.py", line 148, in main
_train(dataset_name, backbone_name, path_to_data_dir, path_to_checkpoints_dir, path_to_resuming_checkpoint)
File "/media/liye/volume0/Ubuntu/PythonProject/easy-fpn.pytorch/train.py", line 52, in train
for batch_index, (
, image_batch, _, bboxes_batch, labels_batch) in enumerate(dataloader):
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 187, in default_collate
return [default_collate(samples) for samples in transposed]
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 187, in
return [default_collate(samples) for samples in transposed]
File "/home/liye/anaconda3/envs/easy-fpn/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 164, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: cannot unsqueeze empty tensor

Process finished with exit code 1

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

1 participant