Skip to content

Instantly share code, notes, and snippets.

@negedng
Created October 18, 2020 20:25
Show Gist options
  • Save negedng/0dc4c3a57181243c33bc2544d046176d to your computer and use it in GitHub Desktop.
Save negedng/0dc4c3a57181243c33bc2544d046176d to your computer and use it in GitHub Desktop.
shapes=([200],())
ds1_train = (
ds1_train
.map(encode_map_fn)
.map(truncate)
.cache()
.shuffle(1024)
.padded_batch(32, shapes)
.prefetch(tf.data.experimental.AUTOTUNE)
)
ds1_val = (
ds1_val
.map(encode_map_fn)
.map(truncate)
.cache()
.padded_batch(32, shapes)
.prefetch(tf.data.experimental.AUTOTUNE)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment