Skip to content
Discussion options

You must be logged in to vote

Here is how PyTorch listening calculates the total steps,

check this ref

# Here is the computation to estimate the total number of batches seen within an epoch.

# Find the total number of train batches
total_train_batches = total_train_samples // (train_batch_size * world_size)

# Compute how many times we will call validation during the training loop
val_check_batch = max(1, int(total_train_batches * val_check_interval))
val_checks_per_epoch = total_train_batches / val_check_batch

# Find the total number of validation batches
total_val_batches = total_val_samples // (val_batch_size * world_size)

# Total number of batches run
total_fit_batches = total_train_batches + total_val_batches

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@titu1994
Comment options

@mehadi92
Comment options

@mehadi92
Comment options

@mehadi92
Comment options

Answer selected by mehadi92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants