Created
July 30, 2018 06:21
-
-
Save Tathagatd96/e1c533c741931feeb82a2aaf92f3290d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_epoch=5 | |
batch_size=150 | |
num_test_images=10 | |
with tf.Session() as sess: | |
sess.run(init) | |
for epoch in range(num_epoch): | |
num_batches=mnist.train.num_examples//batch_size | |
for iteration in range(num_batches): | |
X_batch,y_batch=mnist.train.next_batch(batch_size) | |
sess.run(train,feed_dict={X:X_batch}) | |
train_loss=loss.eval(feed_dict={X:X_batch}) | |
print("epoch {} loss {}".format(epoch,train_loss)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment