Skip to content

Commit

Permalink
move calculating total_batch to outside
Browse files Browse the repository at this point in the history
  • Loading branch information
HanbumKo authored and kkweon committed May 8, 2018
1 parent 7e4b46c commit 905b3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lab-10-5-mnist_nn_dropout.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
learning_rate = 0.001
training_epochs = 15
batch_size = 100
total_batch = int(mnist.train.num_examples / batch_size)

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

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

0 comments on commit 905b3d0

Please sign in to comment.