public class ScoreListener extends BaseListener
| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<DecimalFormat> |
DF_2DP |
protected static ThreadLocal<DecimalFormat> |
DF_2DP_SCI |
protected static ThreadLocal<DecimalFormat> |
DF_5DP |
protected static ThreadLocal<DecimalFormat> |
DF_5DP_SCI |
| Constructor and Description |
|---|
ScoreListener()
Create a ScoreListener reporting every 10 iterations, and at the end of each epoch
|
ScoreListener(int frequency)
Create a ScoreListener reporting every N iterations, and at the end of each epoch
|
ScoreListener(int frequency,
boolean reportEpochs)
Create a ScoreListener reporting every N iterations, and optionally at the end of each epoch
|
ScoreListener(int frequency,
boolean reportEpochs,
boolean reportIterPerformance) |
| Modifier and Type | Method and Description |
|---|---|
ListenerResponse |
epochEnd(SameDiff sd,
At at,
LossCurve lossCurve,
long epochTimeMillis)
Called at the end of every epoch, when fitting from an iterator
|
void |
epochStart(SameDiff sd,
At at)
Called at the start of every epoch, when fitting from an iterator
|
protected String |
format2dp(double d) |
protected String |
format5dp(double d) |
protected String |
formatDurationMs(long ms) |
boolean |
isActive(Operation operation)
Returns whether this listener is active during the given operation.
|
void |
iterationDone(SameDiff sd,
At at,
MultiDataSet dataSet,
Loss loss)
Called at the end of every iteration, after all operations (including updating parameters) has been completed
|
void |
iterationStart(SameDiff sd,
At at,
MultiDataSet data,
long etlMs)
Called at the start of every iteration (minibatch), before any operations have been executed
|
activationAvailable, operationEnd, operationStart, opExecution, preOpExecution, preUpdate, requiredVariables, validationDoneprotected static final ThreadLocal<DecimalFormat> DF_2DP
protected static final ThreadLocal<DecimalFormat> DF_2DP_SCI
protected static final ThreadLocal<DecimalFormat> DF_5DP
protected static final ThreadLocal<DecimalFormat> DF_5DP_SCI
public ScoreListener()
public ScoreListener(int frequency)
public ScoreListener(int frequency,
boolean reportEpochs)
public ScoreListener(int frequency,
boolean reportEpochs,
boolean reportIterPerformance)
public boolean isActive(Operation operation)
Listenerpublic void epochStart(SameDiff sd, At at)
ListenerepochStart in interface ListenerepochStart in class BaseListenersd - The SameDiff instanceat - Current iteration/epoch etcpublic ListenerResponse epochEnd(SameDiff sd, At at, LossCurve lossCurve, long epochTimeMillis)
ListenerepochEnd in interface ListenerepochEnd in class BaseListenersd - The SameDiff instanceat - Current iteration/epoch etclossCurve - The losses so farepochTimeMillis - How long this epoch tookpublic void iterationStart(SameDiff sd, At at, MultiDataSet data, long etlMs)
ListeneriterationStart in interface ListeneriterationStart in class BaseListenersd - The SameDiff instanceat - Current iteration/epoch etcpublic void iterationDone(SameDiff sd, At at, MultiDataSet dataSet, Loss loss)
ListeneriterationDone in interface ListeneriterationDone in class BaseListenersd - The SameDiff instanceat - Current iteration/epoch etcdataSet - The current dataset (minibatch) used for trainingloss - The loss value for the current minibatch. Will be null except for during trainingprotected String formatDurationMs(long ms)
protected String format2dp(double d)
protected String format5dp(double d)
Copyright © 2021. All rights reserved.