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 #5

Open
iostreambond opened this issue Jul 26, 2023 · 0 comments
Open

RuntimeError: stack expects a non-empty TensorList #5

iostreambond opened this issue Jul 26, 2023 · 0 comments

Comments

@iostreambond
Copy link

After configuring the code when I am running it using the command:

python3 complete_retrieval.py --saved_model="../models/model_best_e247_loss_9.7173.pth"

I am getting the following Error

Clip ../data/UCF-101/ShavingBeard/v_ShavingBeard_g05_c06.avi Failed
Traceback (most recent call last):
  File "complete_retrieval.py", line 253, in <module>
    train_classifier(str(run_id), arch, str(saved_model), modes)
  File "complete_retrieval.py", line 132, in train_classifier
    pred_dict, label_dict = val_epoch(len(modes), run_id, epoch, modes[val_iter], skip[val_iter],
  File "complete_retrieval.py", line 20, in val_epoch
    for i, (inputs, label, vid_path, _) in enumerate(data_loader):
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise
    raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/multi-sy-15/PycharmProjects/TCLR/venv_tclr/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
    return self.collate_fn(data)
  File "/home/multi-sy-15/PycharmProjects/TCLR/nn_retrieval/dl_ret.py", line 283, in collate_fn2
    f_clip = torch.stack(f_clip, dim=0)
RuntimeError: stack expects a non-empty TensorList
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