athena.utils.metric_check¶
MetricChecker
Module Contents¶
Classes¶
MetricChecker |
Hold and save best metric checkpoint |
-
class
athena.utils.metric_check.MetricChecker(optimizer)¶ Hold and save best metric checkpoint :param name: MetricChecker name :param maximum: more greater more better
-
__call__(self, loss, metrics, evaluate_epoch=-1)¶ summary the basic metrics like loss, lr :param loss: :param matrics: average loss of all previous steps in one epoch
if training is False, it must be providedParameters: evaluate_epoch – if evaluate_epoch >= 0: <evaluate mode> if evaluate_epoch == -1: <train mode> if evaluate_epoch < -1: <evaluate_log mode> (no tf.summary.write) Returns: return average and best(if improved) loss if training is False Return type: logging_str
-
summary_train(self, loss, metrics)¶ generate summary of learning_rate, loss, metrics, speed and write on Tensorboard
-
summary_evaluate(self, loss, metrics, epoch=-1)¶ If epoch > 0, return a summary of loss and metrics on dev set and write on Tensorboard Otherwise, just return evaluate loss and metrics
-