Skip to content

Conversation

@gdarkwah
Copy link
Contributor

@gdarkwah gdarkwah commented Mar 2, 2022

introduced the number of batches ('n_batches') option for the save frequency instead of 'batch_size'. Using 'batch_size' works in this tutorial because the length of the training data is 1000 which coincidentally results in a rounded value of ~32 when it is divided by the 'batch_size'. In cases when the number of samples is not 1000, this will result in the model saving at different epoch frequencies other than after every 5 epochs.

the definition of 'save_freq' (https://www.tensorflow.org/api_docs/python/tf/keras/callbacks/ModelCheckpoint#args) clearly refers to the number of batches ('n_batches' in this context) and not the number of samples in a batch ('batch_size').

introduced the number of batches ('n_batches') option for the save frequency instead of  'batch_size'. Using 'batch_size' works in this tutorial because the length of the training data is 1000 which coincidentally results in a rounded value of ~32 when it is divided by the 'batch_size'. In cases when the number of samples is not 1000, this will result in the model saving at different epoch frequencies other than after every 5 epochs.

the definition of 'save_freq' (https://www.tensorflow.org/api_docs/python/tf/keras/callbacks/ModelCheckpoint#args) clearly refers to the number of batches ('n_batches' in this context) and not the number of samples in a batch ('batch_size').
@google-cla
Copy link

google-cla bot commented Mar 2, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@8bitmp3 8bitmp3 self-assigned this Mar 4, 2022
@8bitmp3
Copy link
Contributor

8bitmp3 commented Mar 27, 2023

@MarkDaoust @markmcd PTAL

MarkDaoust
MarkDaoust previously approved these changes Mar 28, 2023
Copy link
Member

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks.

@github-actions github-actions bot added the lgtm Community-added approval label Mar 28, 2023
@8bitmp3 8bitmp3 added ready to pull Start merge process and removed awaiting-technical-review labels Mar 29, 2023
@8bitmp3 8bitmp3 requested a review from a team as a code owner April 3, 2023 21:37
@copybara-service copybara-service bot merged commit dd0a65e into tensorflow:master Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Community-added approval ready to pull Start merge process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants