src.superphot_plus.sfd.model.metrics

Module Contents

Classes

ModelMetrics

Class containing the training and validation metrics.

class ModelMetrics[source]

Class containing the training and validation metrics.

train_acc: List[float][source]
val_acc: List[float][source]
train_loss: List[float][source]
val_loss: List[float][source]
epoch_mins: List[int][source]
epoch_secs: List[int][source]
curr_epoch: int = 0[source]
get_values()[source]

Returns the training and validation accuracies and losses.

Returns:

A tuple containing the training accuracy and loss, and validation accuracy and loss, respectively.

Return type:

tuple

append(train_metrics, val_metrics, epoch_time)[source]

Appends training information for an epoch.

Parameters:
  • train_metrics (tuple) – The epoch training loss and accuracy.

  • val_metrics (tuple) – The epoch validation loss and accuracy.

  • epoch_time (tuple) – The number of minutes and seconds spent by the epoch.

print_last()[source]

Prints the metrics for the last epoch.