Skip to content

Commit

Permalink
small change to format code (tensorflow#9223)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjj2wry authored and drpngx committed Apr 14, 2017
1 parent 25aaa0b commit 4019c58
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tensorflow/examples/tutorials/mnist/mnist_with_summaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def nn_layer(input_tensor, input_dim, output_dim, layer_name, act=tf.nn.relu):
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
tf.summary.scalar('accuracy', accuracy)

# Merge all the summaries and write them out to /tmp/tensorflow/mnist/logs/mnist_with_summaries (by default)
# Merge all the summaries and write them out to
# /tmp/tensorflow/mnist/logs/mnist_with_summaries (by default)
merged = tf.summary.merge_all()
train_writer = tf.summary.FileWriter(FLAGS.log_dir + '/train', sess.graph)
test_writer = tf.summary.FileWriter(FLAGS.log_dir + '/test')
Expand Down Expand Up @@ -196,9 +197,11 @@ def main(_):
help='Initial learning rate')
parser.add_argument('--dropout', type=float, default=0.9,
help='Keep probability for training dropout.')
parser.add_argument('--data_dir', type=str, default='/tmp/tensorflow/mnist/input_data',
parser.add_argument('--data_dir', type=str,
default='/tmp/tensorflow/mnist/input_data',
help='Directory for storing input data')
parser.add_argument('--log_dir', type=str, default='/tmp/tensorflow/mnist/logs/mnist_with_summaries',
parser.add_argument('--log_dir', type=str,
default='/tmp/tensorflow/mnist/logs/mnist_with_summaries',
help='Summaries log directory')
FLAGS, unparsed = parser.parse_known_args()
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)

0 comments on commit 4019c58

Please sign in to comment.