GANS W2, Project Epochs?

Hello, in the final step of the training, it seems like Epoch 50 should have been printed out, but it stopped at Epoch 49.
Is that because for i in range(number), i only does 1 through number - 1? If that’s the case, should we not have run this through range(n_epochs+1)?
for epoch in range(n_epochs):
Epoch 49, step 23000

Hi @inposition ,

It is correct that it stopped at epoch 49, because the function range() generates 50 numbers, from 0 to 49.
Here is a link that explains in details on how the function range () works. You may find it helpful.

Thanks. That’s what I thought, I just didn’t understand why it starts at epoch 1 and ends at epoch 49. That’s 49 epochs ran total. Does it not show epoch 0?

Hi @inposition

My display may be different from yours. You can put a print statement just under the ‘For epoch’ loop to print out the value of epoch. That way, you can be sure how many epochs ran through in total.