ai4med.components.stats_loggers package
-
class
PrintTrainEpochStats
Bases:
ai4med.components.stats_loggers.stats_logger.StatsLogger
Prints stats of a training epoch, based on info in the Train Context.
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) Prints stats of a training epoch, based on info in the Train Context, including how long the current epoch took, the average time each epoch took so far, estimated training time remaining, the current best validation metric and the epoch at which the best metric was achieved.
- Parameters
train_ctx – the train context
Returns:
-
-
class
PrintTrainStepStats
(bar_length=20, new_line=True) Bases:
ai4med.components.stats_loggers.stats_logger.StatsLogger
Prints the stats of the current training step to console.
- Parameters
bar_length (int) – number of bar chars for showing percentage of completion
new_line (bool) – whether to create a new line for each reporting. If set to False, all steps are
on the same line on the screen. (printed) –
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) - Prints step stats based on data in the training context, including:
Current epoch vs. total number of epochs; Current iteration vs. total number of iterations in the epoch; Accumulated values of print tensors; Time taken by this step.
- Parameters
train_ctx – the training context
Returns:
-
class
PrintValidationStats
Bases:
ai4med.components.stats_loggers.stats_logger.StatsLogger
Prints the stats of model validation
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) - Prints the stats of model validation, based on the data in training context, including:
Current epoch vs. total number of epochs; Accumulated values of print tensors; Aggregated values of print metrics
- Parameters
train_ctx – the training context
Returns:
-
-
class
RecordTrainEvents
Bases:
ai4med.components.stats_loggers.stats_logger.StatsLogger
Record training summary stats to tensorboard
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) Record training summary stats to tensorboard, based on data in the training context. The data to be recorded are the values of summary tensors
- Parameters
train_ctx –
Returns:
-
-
class
RecordValidationEvents
Bases:
ai4med.components.stats_loggers.stats_logger.StatsLogger
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) Computes and logs the stats data based on the training contextual data.
- Parameters
train_ctx – context that contains training contextual data
Returns:
-
-
class
StatsLogger
Bases:
object
StatsLogger is used to log stats info during training.
-
log
(train_ctx: ai4med.common.train_ctx.TrainContext) Computes and logs the stats data based on the training contextual data.
- Parameters
train_ctx – context that contains training contextual data
Returns:
-