TensorFlow Interview Questions and Answers
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]) |
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: