Commit 6d140f13 authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #2101 from mari-linhares/patch-9

Fixing style and typos
parents 4d543417 01122544
......@@ -18,8 +18,6 @@ See http://www.cs.toronto.edu/~kriz/cifar.html.
"""
import os
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
HEIGHT = 32
......
......@@ -78,7 +78,7 @@ tf.flags.DEFINE_float('learning_rate', 0.1,
The learning rate will decrease during training.
For more details check the model_fn implementation
in this file.
""".)
""")
tf.flags.DEFINE_boolean('use_distortion_for_training', True,
'If doing image distortion for training.')
......@@ -317,8 +317,7 @@ def _resnet_model_fn(features, labels, mode):
num_batches_per_epoch * x
for x in np.array([82, 123, 300], dtype=np.int64)
]
staged_lr = [FLAGS.learning_rate * x
for x in [1, 0.1, 0.01, 0.002]]
staged_lr = [FLAGS.learning_rate * x for x in [1, 0.1, 0.01, 0.002]]
learning_rate = tf.train.piecewise_constant(tf.train.get_global_step(),
boundaries, staged_lr)
......
......@@ -46,8 +46,7 @@ def _bytes_feature(value):
def _get_file_names():
"""Returns the file names expected to exist for training, validation
and evaluation in the input_dir."""
"""Returns the file names expected to exist in the input_dir."""
file_names = {}
file_names['train'] = ['data_batch_%d' % i for i in xrange(1, 5)]
file_names['validation'] = ['data_batch_5']
......@@ -81,9 +80,8 @@ def convert_to_tfrecord(input_files, output_file):
record_writer.write(example.SerializeToString())
record_writer.close()
def main(argv):
del argv # Unused.
def main(unused_argv):
file_names = _get_file_names()
for mode, files in file_names.items():
input_files = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment