TensorFlow 面试题与答案
Question: How do you implement early stopping in a TensorFlow model training process?Answer: Early stopping can be implemented using callbacks, such as tf.keras.callbacks.EarlyStopping. It monitors a specified metric and stops training if the metric does not improve after a certain number of epochs.Example: early_stopping = tf.keras.callbacks.EarlyStopping(monitor='val_loss', patience=3) model.fit(train_data, epochs=100, callbacks=[early_stopping]) |
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗? 是 否
用户评价最有帮助的内容: