Class CollectScoresIterationListener
- java.lang.Object
-
- org.deeplearning4j.optimize.api.BaseTrainingListener
-
- org.deeplearning4j.optimize.listeners.CollectScoresIterationListener
-
- All Implemented Interfaces:
TrainingListener
public class CollectScoresIterationListener extends BaseTrainingListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCollectScoresIterationListener.ScoreStat
-
Constructor Summary
Constructors Constructor Description CollectScoresIterationListener()Constructor for collecting scores with default saving frequency of 1CollectScoresIterationListener(int frequency)Constructor for collecting scores with the specified frequency.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexportScores(File file)Export the scores to the specified file in delimited (one per line) UTF-8 format, tab delimitedvoidexportScores(File file, String delimiter)Export the scores to the specified file in delimited (one per line) UTF-8 format, using the specified delimitervoidexportScores(OutputStream outputStream)Export the scores in tab-delimited (one per line) UTF-8 format.voidexportScores(OutputStream outputStream, String delimiter)Export the scores in delimited (one per line) UTF-8 format with the specified delimiterCollectScoresIterationListener.ScoreStatgetScoreVsIter()voiditerationDone(Model model, int iteration, int epoch)Event listener for each iteration.-
Methods inherited from class org.deeplearning4j.optimize.api.BaseTrainingListener
onBackwardPass, onEpochEnd, onEpochStart, onForwardPass, onForwardPass, onGradientCalculation
-
-
-
-
Constructor Detail
-
CollectScoresIterationListener
public CollectScoresIterationListener()
Constructor for collecting scores with default saving frequency of 1
-
CollectScoresIterationListener
public CollectScoresIterationListener(int frequency)
Constructor for collecting scores with the specified frequency.- Parameters:
frequency- Frequency with which to collect/save scores
-
-
Method Detail
-
iterationDone
public void iterationDone(Model model, int iteration, int epoch)
Description copied from interface:TrainingListenerEvent listener for each iteration. Called once, after each parameter update has ocurred while training the network- Specified by:
iterationDonein interfaceTrainingListener- Overrides:
iterationDonein classBaseTrainingListener- Parameters:
model- the model iteratingiteration- the iteration
-
getScoreVsIter
public CollectScoresIterationListener.ScoreStat getScoreVsIter()
-
exportScores
public void exportScores(OutputStream outputStream) throws IOException
Export the scores in tab-delimited (one per line) UTF-8 format.- Throws:
IOException
-
exportScores
public void exportScores(OutputStream outputStream, String delimiter) throws IOException
Export the scores in delimited (one per line) UTF-8 format with the specified delimiter- Parameters:
outputStream- Stream to write todelimiter- Delimiter to use- Throws:
IOException
-
exportScores
public void exportScores(File file) throws IOException
Export the scores to the specified file in delimited (one per line) UTF-8 format, tab delimited- Parameters:
file- File to write to- Throws:
IOException
-
exportScores
public void exportScores(File file, String delimiter) throws IOException
Export the scores to the specified file in delimited (one per line) UTF-8 format, using the specified delimiter- Parameters:
file- File to write todelimiter- Delimiter to use for writing scores- Throws:
IOException
-
-