JJBOY / BMN-Boundary-Matching-Network

A pytorch-version implementation codes of paper: "BMN: Boundary-Matching Network for Temporal Action Proposal Generation", which is accepted in ICCV 2019.
MIT License
291 stars 64 forks source link

PEM loss=NaN #2

Closed yklilfft closed 5 years ago

yklilfft commented 5 years ago

Thanks a lot for this code! I simply run the script to train BMN model. However I got PEM loss=NaN , and I find that label confidence is all 0. What 's wrong there?

JJBOY commented 5 years ago

Thanks a lot for this code! I simply run the script to train BMN model. However I got PEM loss=NaN , and I find that label confidence is all 0. What 's wrong there?

I met the same problem when I debuged the model, but I have sloved this problem before I release the code. I forgot what's the problem and how to slove it. I will check the code again.

yklilfft commented 5 years ago

Thanks a lot. I think I have found the problem.. In dataset.py line114 and 115,when using python 2, because of division difference, all results are 0. So I fixed it by change line 114&115 like below: tstart = s / float(self.temporal_scale) + self.temporal_gap / 2 tend = e / float(self.temporal_scale) + self.temporal_gap / 2

yklilfft commented 5 years ago

After test, it worked.

JJBOY commented 5 years ago

that's the problem, I met it when I change the code from the BSN in python2 to my code in python3. the hyperparameters may also not the optimal choices, I dont save these parameters and the model, you may need to do more expriments to get a good result. In my memery, the best result of my expriments is near to the BSN but could't the get results as the paper.