Created
December 6, 2018 08:30
-
-
Save hadifar/56d9bf89b9a8b336d318f16e3b5a5ee3 to your computer and use it in GitHub Desktop.
This file contains 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
training_dataset = tf.data.Dataset.from_tensor_slices((train_data, train_labels)).repeat(5).shuffle(1024).batch(batch_size) | |
test_dataset = tf.data.Dataset.from_tensor_slices((test_data, test_labels)).repeat(1).batch(batch_size) | |
iterator = tf.data.Iterator.from_structure(training_dataset.output_types, | |
training_dataset.output_shapes) | |
train_init_op = iterator.make_initializer(training_dataset) | |
test_init_op = iterator.make_initializer(test_dataset) | |
# Input data | |
x, y = iterator.get_next() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment