Google I / O가 5 월 18 ~ 20 일에 돌아옵니다! 공간을 예약하고 일정을 짜세요 지금 등록하세요

tf.keras.callbacks.History

Callback that records events into a History object.

Inherits From: Callback

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)
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

View source

set_params

View source