Skip to content

Commit 905b3d0

Browse files
HanbumKokkweon
authored andcommitted
move calculating total_batch to outside
1 parent 7e4b46c commit 905b3d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lab-10-5-mnist_nn_dropout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
learning_rate = 0.001
1616
training_epochs = 15
1717
batch_size = 100
18+
total_batch = int(mnist.train.num_examples / batch_size)
1819

1920
# input place holders
2021
X = tf.placeholder(tf.float32, [None, 784])
@@ -66,7 +67,6 @@
6667
# train my model
6768
for epoch in range(training_epochs):
6869
avg_cost = 0
69-
total_batch = int(mnist.train.num_examples / batch_size)
7070

7171
for i in range(total_batch):
7272
batch_xs, batch_ys = mnist.train.next_batch(batch_size)

0 commit comments

Comments
 (0)