Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created May 27, 2019 12:06
Show Gist options
  • Save shubham0204/812120f619873dcdcb0a49d6a4eea7f5 to your computer and use it in GitHub Desktop.
Save shubham0204/812120f619873dcdcb0a49d6a4eea7f5 to your computer and use it in GitHub Desktop.
num_epochs = 10
num_samples = X.shape[0]
batch_size = 10
learning_rate = 0.001
dataset = tf.data.Dataset.from_tensor_slices(( X , Y ))
dataset = dataset.shuffle( 500 ).repeat( num_epochs ).batch( batch_size )
iterator = dataset.__iter__()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment