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

How to slove the datalaoder problem when training the model? #7

Open
Sranc3 opened this issue Jul 5, 2023 · 7 comments
Open

How to slove the datalaoder problem when training the model? #7

Sranc3 opened this issue Jul 5, 2023 · 7 comments

Comments

@Sranc3
Copy link

Sranc3 commented Jul 5, 2023

When I try to use the officile code to train the mdoel, I got the problem when laoding the training data:

Original Traceback (most recent call last):
File "/home/mayue/miniconda3/envs/ADAPT/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in worker_loop
data = fetcher.fetch(index)
File "/home/mayue/miniconda3/envs/ADAPT/lib/python3.8/site-packages/torch/utils/data/utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/mayue/miniconda3/envs/ADAPT/lib/python3.8/site-packages/torch/utils/data/utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/csr/ADAPT/src/datasets/vision_language_tsv.py", line 395, in getitem
raw_frames, is_video = self.get_visual_data(img_idx, start, end)
File "/home/csr/ADAPT/src/datasets/vision_language_tsv.py", line 322, in get_visual_data
row = self.get_row_from_tsv(self.visual_tsv, idx)
File "/home/csr/ADAPT/src/datasets/vision_language_tsv.py", line 171, in get_row_from_tsv
assert row[0].split('/')[0] == self.image_keys[img_idx].split('
')[-1] or row[0].split('
')[-1] == self.image_keys[img_idx].split('
')[-1]
AssertionError

I have seen the original code and I guess you have faced with the same problem, could you tell me how to fix it, thank you very much!

@jxbbb
Copy link
Owner

jxbbb commented Jul 5, 2023

Thanks for your interests. I have trained the model again but do not find the bugs. I print some examples and hope this can help you.
image
image

@Sranc3
Copy link
Author

Sranc3 commented Jul 6, 2023

Thanks for your reply, It may be something wrong with my local train_info files, we will check it carefuly. Thanks again!

@Sranc3
Copy link
Author

Sranc3 commented Jul 6, 2023

Thanks for your reply, It may be something wrong with my local train_info files, we will check it carefuly. Thanks again!

I have finally figured out that it's the problem with the download file 'training_32frames_img_size256.img.tsv', it works well in test dataloader and val datalaoder, but the some of the contents are missing in training tsv, and I get a blank row.
image

@jxbbb
Copy link
Owner

jxbbb commented Jul 6, 2023

It seems that some files in dataset or dataset_part are missed. You can check the data structure in https://github.com/jxbbb/ADAPT#dataset-preparation. Note that dataset and dataset_part are both needed when training.

@Sranc3
Copy link
Author

Sranc3 commented Jul 9, 2023

Sorry to bother you again, we have redownloaded the code and data, but sitll we get the following problem:
image
It seems that the gt_signals(torch.size(715)) and pred_signals(torch.size(715,1)) have the wrong shape, so what are they supposed to be?

@jxbbb
Copy link
Owner

jxbbb commented Jul 11, 2023

Maybe you can pull the latest code in the hub to your local directory. If this doesn't work, please let me know and I will clone the codes myself and go through the whole process again.

@Sranc3
Copy link
Author

Sranc3 commented Jul 11, 2023

Yes, we are using the latest code, and we don't make any changes.

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