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

data-path and code training error #3

Open
obinnadyke opened this issue Jun 19, 2023 · 0 comments
Open

data-path and code training error #3

obinnadyke opened this issue Jun 19, 2023 · 0 comments

Comments

@obinnadyke
Copy link

Hi!
I tried to train the model with UCF101 dataset and test on HMDB51 but i got the errors. After debugging the below error indicates model cannot read the data. Please confirm that the model can train video data because I noticed that your 'cropped nec-drone' data is images only. Also pls describe how to structure the data-path/directory.
I used the following:

python3 main.py \
    --train_source_dataset ./data/train/source \
    --val_dataset ./data/val/target \
    --epochs 60 \
    --optimizer sgd \
    --lr 0.001 \
    --weight_decay 1e-9 \
    --scheduler cosine \
    --batch_size 32 \
    --n_clips 1 \
    --n_frames 16 \
    --frame_size 224 \
    --num_workers 4 \
    --gpus 0 \
    --train head+partial \
    --mlp_hidden_dim 2048 \
    --mlp_n_layers 0 \
    --replace_with_mlp \
    --name hmdb-ucf-source-head+partial \
    --project transformer_da \
    --save_model \
    --wandb
  1. I got the following error:

Global seed set to 5
Traceback (most recent call last):
File "main.py", line 183, in
main()
File "main.py", line 141, in main
num_workers=args.num_workers,
File "/home/User/Desktop/UDAVT/src/dataloader.py", line 275, in prepare_data
num_workers=num_workers,
File "/home/user/Desktop/UDAVT/src/dataloader.py", line 237, in prepare_dataloaders
drop_last=True,
File "/home/User/anaconda3/envs/venv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 344, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "/home/user/anaconda3/envs/venv/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 108, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

Thanks as i wait your reply. I look forward to train and test your code on UCF101 and HMDB51. Give us link where to download hmdb<-->ucf video dataset too!

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