'Args:
config (TrainConfig): the train config.'

def __init__(self, config):

    assert isinstance(config, TrainConfig), type(config)
    self.config = config
    self.model = config.model
    self.local_step = (-1)
    self._callbacks = []
    self.monitors = []
    self._epoch_num = None
    self._global_step = 0
    self._setup()
