metallic.utils¶
Logger¶
-
class
metallic.utils.
Logger
(root: str, n_iters_per_epoch: int, log_basename: str = '', log_interval: int = 100, tensorboard: bool = False, verbose: bool = False)[source]¶ Bases:
object
A loggger to log and visualize (based on Tensorboard) statistics.
- Parameters
root (str) – Root directory of the log files
n_iters_per_epoch (int) – Number of the iterations per epoch
log_basename (str, optional, default='') – Base name of the log file
log_interval (int, optional, default=100) – Steps between info loggings
tensorboard (bool, optional, default=False) – Enable tensorboard or not (
tensorboard
package is required)verbose (bool, optional, default=False) –
-
log
(data: dict, epoch: int, i_iter: int, stage: str) → None[source]¶ Log statistics generated during updating.
- Parameters
data (dict) – Data to be logged
epoch (int) – Epoch of the data to be logged
i_iter (int) – Iteration of the data to be logged
stage (str) – Name of the current stage