Skip to content

Commit 666d31b

Browse files
committed
twerk twerk twerk twerk twerk
1 parent d34cf18 commit 666d31b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tutorials/image/cifar10/cifar10_train.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
import tensorflow as tf
4444

4545
import cifar10
46+
from cifar10 import FLAGS
4647

47-
parser = argparse.ArgumentParser()
48+
parser = cifar10.parser
4849

4950
parser.add_argument('--train_dir', type=str, default='/tmp/cifar10_train', help='Directory where to write event logs and checkpoint.')
5051

@@ -95,6 +96,7 @@ def after_run(self, run_context, run_values):
9596
self._start_time = current_time
9697

9798
loss_value = run_values.results
99+
# error on next line
98100
examples_per_sec = FLAGS.log_frequency * FLAGS.batch_size / duration
99101
sec_per_batch = float(duration / FLAGS.log_frequency)
100102

@@ -124,4 +126,6 @@ def main(argv=None): # pylint: disable=unused-argument
124126

125127
if __name__ == '__main__':
126128
FLAGS = parser.parse_args()
129+
# for arg in vars(FLAGS):
130+
# print(arg, getattr(FLAGS, arg))
127131
tf.app.run()

0 commit comments

Comments
 (0)