阅读(3514)
赞(12)
TensorFlow回调函数:tf.keras.callbacks.TerminateOnNaN
2019-03-27 15:13:18 更新
tf.keras.callbacks.TerminateOnNaN函数
类 TerminateOnNaN
继承自:Callback
定义在:tensorflow/python/keras/callbacks.py。
当遇到NaN损失会停止训练的回调函数。
__init__
__init__()
初始化自我。
方法
on_batch_begin
on_batch_begin(
batch,
logs=None
)
on_batch_end
on_batch_end(
batch,
logs=None
)
on_epoch_begin
on_epoch_begin(
epoch,
logs=None
)
on_epoch_end
on_epoch_end(
epoch,
logs=None
)
on_train_batch_begin
on_train_batch_begin(
batch,
logs=None
)
on_train_batch_end
on_train_batch_end(
batch,
logs=None
)
on_train_begin
on_train_begin(logs=None)
on_train_end
on_train_end(logs=None)
set_model
set_model(model)
set_params
set_params(params)