View source on GitHub |
Callback that records events into a History
object.
Inherits From: Callback
tf.keras.callbacks.History()
This callback is automatically applied to
every Keras model. The History
object
gets returned by the fit
method of models.
Example:
model = tf.keras.models.Sequential([tf.keras.layers.Dense(10)])
model.compile(tf.keras.optimizers.SGD(), loss='mse')
history = model.fit(np.arange(100).reshape(5, 20), np.zeros(5),
epochs=10, verbose=1)
print(history.params)
{'verbose': 1, 'epochs': 10, 'steps': 1}
# check the keys of history object
print(history.history.keys())
dict_keys(['loss'])
Methods
set_model
set_model(
model
)
set_params
set_params(
params
)