keras/src/callbacks/tensorboard.py/TensorBoard/on_train_begin
class TensorBoard:    def on_train_begin(self, logs=None):
        self._global_train_batch = 0
        self._previous_epoch_iterations = 0
        self._push_writer(self._train_writer, self._train_step)