SPOT icon indicating copy to clipboard operation
SPOT copied to clipboard

Something's wrong with the training code.

Open hj611 opened this issue 2 years ago • 2 comments

bug1. SPOT-main/spot_train.py", line 337, in pretrain ep, tot_loss,feat_loss,loss_clip_order)) UnboundLocalError: local variable 'tot_loss' referenced before assignment

bug2. File " /SPOT-main/spot_train.py", line 786, in train_loader = torch.utils.data.DataLoader(spot_dataset.SPOTDataset(subset="train"), File " /.conda/envs/SPOT/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 270, in init sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File " /.conda/envs/SPOT/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 102, in init raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0

hj611 avatar Nov 06 '23 03:11 hj611

I encountered the same problem as you. This code seems hard to run through.

nohi191212 avatar Nov 13 '23 00:11 nohi191212

I guess that you directly run this codes with I3D features, In the splot_dataloader.py file, the author utilize the TSN features. You use the TSN features and the codes can be run successfully!

yujialele avatar Jul 03 '24 10:07 yujialele