-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why the training loss always none? #17
Comments
This happens to me , too . the version of Pytorch is 0.4.1 . 100%|█████████████████████████████████████████████████████████████████████████████████| 108/108 [01:02<00:00, 2.30it/s] Save model at /media/ext/lizhongguo/ActionRecognition/pytorch-video-recognition/run/run_1/models/C3D-ucf101_epoch-99.pth.tar 100%|█████████████████████████████████████████████████████████████████████████████████| 136/136 [01:16<00:00, 3.15it/s] |
Hi, you may reduce the learning rate. |
i also suffered from Loss:Nan.. If Loss is nan, then cannot store weights. so model cant increase accuracy.... |
I checked the code from https://github.com/facebookresearch/VMZ/blob/master/lib/models/c3d_model.py , and added BatchNorm layer between Conv layer and Relu layer . Now it seems working on UCF-101 dataset . |
@lizhongguo let me have a look |
Reducing learning rate means selecting a rate lower than 1e-3, such as 1e-5 or 0.5e-3. Personally I trained the model from scratch on UCF101 with learning rate equal to 1e-3, without having any NaN issues. |
@wave-transmitter Thank you for comment ! i solved this problem using learning rate. |
however, when i reduce Learning rate, the acc is just 0.20, what should i do |
@ilovekj |
@makeastir but there is another question, it seems that they are splitting the dataset randomly, which is not allowed, there are three official splits, and when I use this code, it performance poor |
@ilovekj i also used this code and i got efficient performance. In this code has augmentation module so that this code should make dataset more useful. how about increase to your dataset quantity ? In my case, Non-True is 400 , True is 150. Or reduce to features of dataset ? |
@makeastir but you didn't use the official splits |
@ilovekj Hi. I used official split and corresponding dataloader and I only got 1% accuracy. But the same code on the random split is 98%. I wonder did you figure out the problem? |
maybe we didn't use pretrain model, but i am not sure |
I got some loss like this:
It;s all nan, for what reason maybe?
The text was updated successfully, but these errors were encountered: