Skip to content

Instantly share code, notes, and snippets.

@rahulbhadani
Created September 23, 2019 08:35
Show Gist options
  • Save rahulbhadani/bcba137ec5d2b0671091172d6e8a04c0 to your computer and use it in GitHub Desktop.
Save rahulbhadani/bcba137ec5d2b0671091172d6e8a04c0 to your computer and use it in GitHub Desktop.
from NeuralNetwork import NLayerPerceptron
import sys
import warnings
import tensorflow as tf
#It will download and read in the data automatically
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
batchSize = 128
batch_x, batch_y = mnist.train.next_batch(batchSize)
optimizer = tf.train.AdamOptimizer
N = NLayerPerceptron()
N.train(x= batch_x, y = batch_y, optimizer=optimizer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment