Neural networks are the core of deep learning, a field which has practical applications in many different areas. Today neural networks are used for image classification, speech recognition, object detection etc. Now, Let’s try to understand the basic unit behind all this state of art technique.
A single neuron transforms given input into some output. Depending on the given input and weights assigned to each input, decide whether the neuron fired or not. Let’s assume the neuron has 3 input connections and one output.
We will be using tanh activation function in given example.
The end goal is to find the optimal set of weights for this neuron which produces correct results. Do this by training the neuron with several different training examples. At each step calculate the error in the output of neuron, and back propagate the gradients. The step of calculating the output of neuron is called forward propagation while calculation of gradients is called back propagation.
Below is the implementation :
Random weights at the start of training [[-0.16595599] [ 0.44064899] [-0.99977125]] New weights after training [[5.39428067] [0.19482422] [0.34317086]] Testing network on new examples -> [0.99995873]
- Implementing Artificial Neural Network training process in Python
- Neural Network Advances
- Introduction to Artificial Neural Network | Set 2
- Introduction to Convolution Neural Network
- Introduction to Recurrent Neural Network
- Why For loop is not preferred in Neural Network Problems?
- Applying Convolutional Neural Network on mnist dataset
- Implementation of Artificial Neural Network for XOR Logic Gate with 2-bit Binary Input
- Choose optimal number of epochs to train a neural network in Keras
- Implementation of Artificial Neural Network for NOR Logic Gate with 2-bit Binary Input
- Implementation of Artificial Neural Network for OR Logic Gate with 2-bit Binary Input
- Implementation of Artificial Neural Network for AND Logic Gate with 2-bit Binary Input
- Implementation of Artificial Neural Network for NAND Logic Gate with 2-bit Binary Input
- Implementation of Artificial Neural Network for XNOR Logic Gate with 2-bit Binary Input
- Deep Neural net with forward and back propagation from scratch - Python
- Single and Double Quotes | Python
- Python | super() in single inheritance
- Locating single elements in Selenium Python
- Transpose a matrix in Single line in Python
- Python - Nested List to single value Tuple
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.