Announcing the TensorFlow Dev Summit 2020 Learn more

tf.keras.callbacks.CSVLogger

TensorFlow 1 version View source on GitHub

Class CSVLogger

Callback that streams epoch results to a csv file.

Inherits From: Callback

Supports all values that can be represented as a string, including 1D iterables such as np.ndarray.

Example:

csv_logger = CSVLogger('training.log')
model.fit(X_train, Y_train, callbacks=[csv_logger])

Arguments:

  • filename: filename of the csv file, e.g. 'run/log.csv'.
  • separator: string used to separate elements in the csv file.
  • append: True: append if file exists (useful for continuing training). False: overwrite existing file,

__init__

View source

__init__(
    filename,
    separator=',',
    append=False
)

Initialize self. See help(type(self)) for accurate signature.

Methods

set_model

View source

set_model(model)

set_params

View source

set_params(params)

Compat aliases