-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the Cifar10ImagePreprocessor class to use newer dataset APIs #320
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Sorry for the very late response.
capacity=min_queue_examples + 3 * self.batch_size, | ||
min_after_dequeue=min_queue_examples) | ||
|
||
dataset_train = dataset_train.shuffle(min_queue_examples).batch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should call .repeat()
in between shuffle
and batch
dataset_train = dataset_train.shuffle(min_queue_examples).batch( | ||
self.batch_size, drop_remainder=True) | ||
|
||
if tf.VERSION > "1.12": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can safely assume TensorFlow is at least version 1.12. There are branches such as cnn_tf_v1.11_compatible
that work with older versions.
self.batch_size, drop_remainder=True) | ||
|
||
if tf.VERSION > "1.12": | ||
raw_images, raw_labels = tf.compat.v1.data.make_one_shot_iterator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for compat.v1
since we have import tensorflow.compat.v1 as tf
at the top. Simply tf.data.make_one_shot_iterator
is fine.
This is regarding the issue #313.