Normalize TensorFlow training steps by batch size#8
Conversation
|
Hi @lewtun! The |
|
That said, the comments are confusing because it isn't clear the division has already been performed. Maybe I should clarify them? |
|
Ah thanks for the insight! I'll close this PR and it would be great if you could open a new one with a clarifying remark because the comment in the code is indeed confusing for TF noobs (myself included!) As a side note, how come the official examples normalize by batch size, e.g. here? In that example, we have num_train_steps=int(training_args.num_train_epochs * train_batches_per_epoch)where train_batches_per_epoch = len(train_dataset) // total_train_batch_sizeIt was reading the official examples that convinced me there was an error in the course 😄 |
|
Agreed! In that example, |
|
Ah that makes more sense now! |
This PR addresses a comment on the forums, where a reader was confused why
num_train_stepswasn't normalized by the batch size.Following the official TensorFlow examples in
transformers, I've included this normalization in all the TensorFlow sections of the course. The only sections I didn't make a change are:because in both those sections we have
and I wasn't sure if this was intentional.