Neural Networks Part 2: Building Neural Networks & Understanding Gradient Descent.
From the previous article, we learnt how a single neuron or perceptron works by taking the dot product of input vectors and weights,adding bias and then applying non-linear activation function to produce output.Now let's take that information and see how these neurons build up to a neural network. Now z W0 xj*wj denotes the dot product of input vectors and weights and our final output y is just activation function applied on z. Now,if we want a multi output neural network(from the diagram above),we can simply add one of these perceptrons & we have two outputs with a different set of weights and inputs.Since all the inputs are densely connected to all the outputs,these layers are also called as Dense layers.To implement this layer, we can use many libraries such keras,tensorflow,pytorch,etc. Here it shows the tensorflow implementation of this 2 perceptron network where units 2 indicate we have two outputs in this layer.We can customize this layer by adding activation function,bias constraint etc. Now,let's take a step further and let's understand how a single layer neural network works where we have a single hidden layer which feeds into the output layer. We call this a hidden layer because unlike our input and output layer which we can see or observe them.Our hidden layers are not directly observable,we can probe inside the network and see them using tools such as Netron but we can't enforce it as these are learned .
Jul-14-2020, 04:23:36 GMT
- Technology: