Created
August 24, 2021 14:13
-
-
Save dpoulopoulos/c1dff63f374b52e1f6a4a0a02f767a1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_samples = 4096 | |
num_tfrecods = len(annotations) // num_samples | |
if len(annotations) % num_samples: | |
num_tfrecods += 1 # add one record if there are any remaining samples | |
if not os.path.exists(tfrecords_dir): | |
os.makedirs(tfrecords_dir) # creating TFRecords output folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment