Defining the number of neurons in each layer

We'll build a four-layer neural network with three hidden layers and one output layer. As the size of the input image is 784, we set num_input to 784, and since we have 10 handwritten digits (0 to 9), we set 10 neurons in the output layer. We define the number of neurons in each layer as follows:

#number of neurons in input layer
num_input = 784

#num of neurons in hidden layer 1
num_hidden1 = 512

#num of neurons in hidden layer 2
num_hidden2 = 256

#num of neurons in hidden layer 3
num_hidden_3 = 128

#num of neurons in output layer
num_output = 10
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset