From the course: Building Recommender Systems with Machine Learning and AI

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Handwriting recognition with TensorFlow, part 2

Handwriting recognition with TensorFlow, part 2 - Python Tutorial

From the course: Building Recommender Systems with Machine Learning and AI

Handwriting recognition with TensorFlow, part 2

- [Instructor] Now we're going to set up the topology of our neural network itself. So that's what neural net here does. And as we said in the slides, you can define these fancy neural networks as just simple matrix multiplication and addition functions here right? So we'll start off by saying tf.matmul, that's just matrix multiplication of our input neurons, which is the raw, 784 pixel values with its 512 weights in our hidden layer of neurons there. So that matrix multiplication is multiplying each one of those input values by the weight in that hidden layer. We then say tf.add to add in the biased terms, which again are stored in the B variable that we just defined above. Okay? Next, we need to apply a sigmoid function to the output of that hidden layer, so that's basically the activation function on each hidden neuron, okay, that's all that's happening there, very simple. The output layer, we'll do it again,…

Contents