0
$\begingroup$

I am currently using TF 2.1. When using model.fit with tf.data.Dataset, it shows me that the number of iterations is 2044/2043. So my question is, how many batches of data are actually produced? 2044 or 2043?

s

$\endgroup$
0
$\begingroup$

Number of batches = total number of samples in dataset/batch size.
If the total samples are not completely divisible by batch size, then it will take the remaining in the next batch.

Eg: 15x66+10=1000 which means it will take 66 batches of size 15 and for the final steps it takes only 10.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.