Skip to content

Instantly share code, notes, and snippets.

@aliyevorkhan
Created November 19, 2020 13:08
Show Gist options
  • Save aliyevorkhan/93ed758f7a9d84758a33ba478d2bacca to your computer and use it in GitHub Desktop.
Save aliyevorkhan/93ed758f7a9d84758a33ba478d2bacca to your computer and use it in GitHub Desktop.
import math
BATCH_SIZE=32
TRAINING_SIZE = 40000
# We take the ceiling because we do not drop the remainder of the batch
compute_steps_per_epoch = lambda x: int(math.ceil(1. * x / BATCH_SIZE))
steps_per_epoch = compute_steps_per_epoch(TRAINING_SIZE)
print(steps_per_epoch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment