TensorFlow-Course
TensorFlow-Course copied to clipboard
2 mistakes found
in linearregression,
# Create a callback that saves the model's weights every 5 epochs
checkpointCallback = tf.keras.callbacks.ModelCheckpoint(
filepath=checkpoint_path,
verbose=1,
save_weights_only=True,
save_freq=n_samples_save)
save_freq should be number of epochs(not batches):
# Create a callback that saves the model's weights every 5 epochs
checkpointCallback = tf.keras.callbacks.ModelCheckpoint(
filepath=checkpoint_path,
verbose=1,
save_weights_only=True,
save_freq=n_epochs_log)
# Return unique list elements
checkpoints =list(set(checkpoints))
print('checkpoints:',checkpoints)
to make the figures understood, the checkpoints file list should be sorted by created order:
# Return unique list elements
checkpoints = sorted(list(set(checkpoints)))
print('checkpoints:',checkpoints)
Thank @owenliang. Please kindly make a pull request.