Skip to content
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

Loss is becoming negative #12

Open
jindongwang opened this issue Nov 23, 2018 · 3 comments
Open

Loss is becoming negative #12

jindongwang opened this issue Nov 23, 2018 · 3 comments

Comments

@jindongwang
Copy link

Very nice work! During my training, I found that loss can become negative:

Train Epoch: 198 [0/100 (0%)]	Loss1: 0.024868	 Loss2: 0.022132	  Discrepancy: 0.018226

Test set: Average loss: -0.0588, Accuracy C1: 9449/10000 (94%) Accuracy C2: 9509/10000 (95%) Accuracy Ensemble: 9554/10000 (96%) 

recording record/usps_mnist_k_4_alluse_no_onestep_False_1_test.txt
Train Epoch: 199 [0/100 (0%)]	Loss1: 0.012343	 Loss2: 0.020431	  Discrepancy: 0.030520

Test set: Average loss: -0.0581, Accuracy C1: 9419/10000 (94%) Accuracy C2: 9518/10000 (95%) Accuracy Ensemble: 9537/10000 (95%) 

recording record/usps_mnist_k_4_alluse_no_onestep_False_1_test.txt

Do you think this is normal?

@postBG
Copy link

postBG commented Feb 19, 2019

I guess so.

@JiaoJinyang
Copy link

JiaoJinyang commented Mar 25, 2019

Because the author used the nll_loss...

@Dr-Zhou
Copy link

Dr-Zhou commented Jul 15, 2019

Very nice work! During my training, I found that loss can become negative:

Train Epoch: 198 [0/100 (0%)]	Loss1: 0.024868	 Loss2: 0.022132	  Discrepancy: 0.018226

Test set: Average loss: -0.0588, Accuracy C1: 9449/10000 (94%) Accuracy C2: 9509/10000 (95%) Accuracy Ensemble: 9554/10000 (96%) 

recording record/usps_mnist_k_4_alluse_no_onestep_False_1_test.txt
Train Epoch: 199 [0/100 (0%)]	Loss1: 0.012343	 Loss2: 0.020431	  Discrepancy: 0.030520

Test set: Average loss: -0.0581, Accuracy C1: 9419/10000 (94%) Accuracy C2: 9518/10000 (95%) Accuracy Ensemble: 9537/10000 (95%) 

recording record/usps_mnist_k_4_alluse_no_onestep_False_1_test.txt

Do you think this is normal?

have you solve this problem?and If my pytorch version is 0.4.1.could I get the same peformance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants