kenshohara / 3D-ResNets-PyTorch

3D ResNets for Action Recognition (CVPR 2018)
MIT License
3.87k stars 930 forks source link

opt.n_val_samples cannot equal to 1? #207

Open Bigsheng97 opened 4 years ago

Bigsheng97 commented 4 years ago

Thanks for sharing this code and it's a great work. I currently faced a problem in this project when I set the opt.n_val_samples equal to 1. It return an error stated below : File "/content/CBAM-ResNet_16_frame/temporal_transforms.py", line 108, in call 1, math.ceil((n_frames - 1 - self.size) / (self.n_samples - 1))) ZeroDivisionError: division by zero

I added a classification report into the project. And I noticed when the the length of validation set dataloader only has N number of videos, but end up with N times opts.n_val_samples in my classification report. Can you help to explain this? Thank you.

XiangL-Xr commented 3 years ago

same problem!