CosineAnnealingLR's T_max

Hi community,

I am seeing to ways of using T_max in CosineAnnealingLR. One is to use the number of epochs and another is to use the number of iterations in the T_max argument.

Example 1:
torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=num_of_epoch, eta_min=0)

Example 2:
torch.optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=num_of_iteration, eta_min=0)

I am not sure which method is correct. Any idea?