sauradip / SPOT

[ECCV 2022] Official Pytorch Implementation of the paper : " Semi-Supervised Temporal Action Detection with Proposal-Free Masking "

Home Page:https://sauradip.github.io/project_pages/SPOT/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Something's wrong with the training code.

hj611 opened this issue · 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

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

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!