3D-ResNets-PyTorch icon indicating copy to clipboard operation
3D-ResNets-PyTorch copied to clipboard

train on ucf,"ValueError: num_samples should be a positive integer value, but got num_samples=0"

Open N00k0428 opened this issue 4 years ago • 3 comments

My structure of data directories is the following:

/data …………/UCF_jpg ……………………/(directories of class names) ………………………………/(directories of video names) …………………………………………/(jpg files) …………/result …………/UCF_json

N00k0428 avatar Feb 24 '21 09:02 N00k0428

Could you post your command line? Might be the json file, the file needs to be under data/.

guilhermesurek avatar Feb 24 '21 11:02 guilhermesurek

my command line: python main.py --root_path /test/3D-ResNets-PyTorch/data --video_path ucf101_jpg --annotation_path UCF_json/ucf101_01.json
--result_path results --dataset ucf101 --n_classes 101 --model resnet --model_depth 50 --batch_size 128
--n_threads 4 --checkpoint 5 --no_cuda

Is anything wrong?

N00k0428 avatar Feb 24 '21 11:02 N00k0428

you can set ‘shuffle=False’ at train_loader

Hanson-Chan avatar Aug 16 '22 14:08 Hanson-Chan