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

Early Stopping Training: ClassificationScoreCalculator not working #5459

Closed
Aulig opened this issue Jun 4, 2018 · 2 comments
Closed

Early Stopping Training: ClassificationScoreCalculator not working #5459

Aulig opened this issue Jun 4, 2018 · 2 comments

Comments

@Aulig
Copy link

Aulig commented Jun 4, 2018

Im using a MultiLayerNetwork for classification. The early stopping trainer always stops the training after the number of epochs specified for epochs without improvement (new ScoreImprovementEpochTerminationCondition(maxNoImprovementEpochs)). The problem however is that the model considered the best by the early stopping trainer (epoch 0) is by no means better than the latest model. If i switch out the ClassificationScoreCalculator for a DataSetLossCalculator it acts as expected. Here is a single class model you can use to see it:

https://pastebin.com/Edvbg9Rz
(dataset is attached to this issue)
This is the stats it achieved for me using Metric.ACCURACY :

Termination reason: EpochTerminationCondition
Termination details: ScoreImprovementEpochTerminationCondition(maxEpochsWithNoImprovement=100, minImprovement=0.0)
Total epochs: 101
Best epoch number: 0
Score at best epoch: 0.2467700258397933

-----"Best" (According to earlystopping training) Model-----

---Testing Dataset---
Accuracy: 0,2468

---Training Dataset---
Accuracy: 0,2735

-----Latest Model-----

---Testing Dataset---
Accuracy: 0,4910

---Training Dataset---
Accuracy: 0,4688

minimalTraining.txt
minimalTesting.txt

@AlexDBlack
Copy link
Contributor

Thanks for reporting: this bug has been fixed here: #5565

You can access the fix by using snapshots: https://deeplearning4j.org/snapshots

@lock
Copy link

lock bot commented Sep 21, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants