cypw / PyTorch-MFNet

MIT License
252 stars 56 forks source link

When using the train_ucf101.py file for model training, the model evaluation part cannot enter the loop. #34

Open LiYe1229 opened 4 years ago

LiYe1229 commented 4 years ago

Traceback (most recent call last): File "train_ucf101.py", line 146, in train_model(sym_net=net, **kwargs) File "/PyTorch-MFNet/train_model.py", line 117, in train_model epoch_end=end_epoch,) File "/PyTorch-MFNet/train/model.py", line 328, in fit self.callback_kwargs['sample_elapse'] = sum_sample_elapse / sum_sample_inst ZeroDivisionError: float division by zero

The error content is as above. When I use the _trainucf101.py file for model training, the loop of the model evaluation part in the /train/model.py file cannot enter, resulting in the _sum_sample_inst_ parameter being zero, and subsequent division operations report an error. I checked the loop body content and The data set reads part of the code and found that all variables have corresponding values. How can I modify the code to make the error disappear?

liuhui0401 commented 2 years ago

I think you should check out your evaluation dataloader. It may be empty.