Skip to content

Commit 2b47f77

Browse files
committed
fix lint errors
1 parent c4c58d2 commit 2b47f77

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

official/resnet/cifar10_main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def preprocess_image(image, is_training):
106106
return image
107107

108108

109-
def input_fn(is_training, data_dir, global_batch_size, num_epochs=1, num_gpus=1):
109+
def input_fn(is_training, data_dir, global_batch_size, num_epochs=1,
110+
num_gpus=1, datasets_num_private_threads=None):
110111
"""Input_fn using the tf.data input pipeline for CIFAR-10 dataset.
111112
112113
Args:
@@ -115,7 +116,7 @@ def input_fn(is_training, data_dir, global_batch_size, num_epochs=1, num_gpus=1)
115116
global_batch_size: The number of samples per batch.
116117
num_epochs: The number of epochs to repeat the dataset.
117118
num_gpus: The number of GPUs.
118-
datasets_num_private_threads: Number of threads for a private
119+
datasets_num_private_threads: Number of threads for a private
119120
threadpool created for all datasets computation.
120121
121122

official/resnet/imagenet_main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def input_fn(is_training, data_dir, global_batch_size, num_epochs=1,
165165
global_batch_size: The number of samples per batch.
166166
num_epochs: The number of epochs to repeat the dataset.
167167
num_gpus: The number of GPUs.
168-
datasets_num_private_threads: Number of threads for a private
168+
datasets_num_private_threads: Number of threads for a private
169169
threadpool created for all datasets computation.
170170
171171
Returns:

official/resnet/resnet_run_loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def process_record_dataset(dataset, is_training, global_batch_size,
7272
# dataset for the appropriate number of epochs.
7373
# Using the fused shuffle_and_repeat method gives better performance.
7474
dataset = dataset.apply(tf.contrib.data.shuffle_and_repeat(
75-
buffer_size=shuffle_buffer, num_epochs))
75+
buffer_size=shuffle_buffer, count=num_epochs))
7676
else:
7777
dataset = dataset.repeat(num_epochs)
7878

official/utils/flags/_performance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _check_loss_scale(loss_scale): # pylint: disable=unused-variable
135135
flags.DEFINE_string(
136136
name="tf_gpu_thread_mode", short_name="gt_mode", default="global",
137137
help=help_wrap(
138-
"Whether and how the GPU device uses its own threadpool.")
138+
"Whether and how the GPU device uses its own threadpool.")
139139
)
140140

141141
if tf_gpu_thread_count:
@@ -146,11 +146,11 @@ def _check_loss_scale(loss_scale): # pylint: disable=unused-variable
146146

147147
if datasets_num_private_threads:
148148
flags.DEFINE_integer(
149-
name="datasets_num_private_threads", short_name="dataset_thread_count",
149+
name="datasets_num_private_threads", short_name="dataset_thread_count",
150150
default=None,
151151
help=help_wrap(
152-
"Number of threads for a private threadpool created for all datasets"
153-
"computation..")
152+
"Number of threads for a private threadpool created for all"
153+
"datasets computation..")
154154
)
155155

156156
return key_flags

0 commit comments

Comments
 (0)