Skip to content

Commit c4e7318

Browse files
committed
roll back AUTOTUNE
1 parent fe3746e commit c4e7318

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

official/resnet/resnet_run_loop.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ def process_record_dataset(dataset, is_training, batch_size, shuffle_buffer,
6868
Dataset of (image, label) pairs ready for iteration.
6969
"""
7070

71-
# Sets tf.data to AUTOTUNE, e.g. num_parallel_batches in map_and_batch.
72-
options = tf.data.Options()
73-
options.experimental_autotune = True
74-
dataset = dataset.with_options(options)
75-
7671
# Prefetches a batch at a time to smooth out the time taken to load input
7772
# files for shuffling and processing.
7873
dataset = dataset.prefetch(buffer_size=batch_size)
@@ -88,6 +83,7 @@ def process_record_dataset(dataset, is_training, batch_size, shuffle_buffer,
8883
tf.contrib.data.map_and_batch(
8984
lambda value: parse_record_fn(value, is_training, dtype),
9085
batch_size=batch_size,
86+
num_parallel_calls=1,
9187
drop_remainder=False))
9288

9389
# Operations between the final prefetch and the get_next call to the iterator

0 commit comments

Comments
 (0)