Backpropagation, Sgmiod Neuron & Gradient Discend
Backpropagation, Sgmiod Neuron & Gradient Discend
Sigmoid Neuron
Sigmoid Neuron
FEED FORWARD NEURAL NETWORK (MULTILAYER
PERCEPTRON)
• Below is a Single layer feed-forward network. Here, the sum of the products of
inputs and weights are calculated and fed to the output. The output is considered
if it is above a certain value i.e threshold and the neuron fires with an activated
output and if it does not fire, the deactivated value is emitted.
• Stochastic Gradient Descent: This is a type of gradient descent which processes 1 training
example per iteration. Hence, the parameters are being updated even after one iteration in which only
a single example has been processed. Hence this is quite faster than batch gradient descent. But again,
when the number of training examples is large, even then it processes only one example which can be
additional overhead for the system as the number of iterations will be quite large.
• Mini Batch gradient descent: This is a type of gradient descent which works faster than both batch
gradient descent and stochastic gradient descent. Here b examples where b<m are processed per
iteration. So even if the number of training examples is large, it is processed in batches of b training
examples in one go. Thus, it works for larger training examples and that too with lesser number of
iterations.
Types of gradient Descent:
Gradient Descent Algorithm This function takes
5 parameters:
• Gradient Descent method’s steps are: 1.starting point - In
1. Choose a starting point (initialization) practice, it is often a random
2. Calculate gradient at this point initialisation
2.gradient function - has
3. Make a scaled step in the opposite
to be specified before-hand
direction to the gradient
3.learning rate - scaling
• (objective: minimize) factor for step sizes
4. Repeat points 2 and 3 until one of the criteria 4.maximum number of
is met: iterations
5. Maximum number of iterations reached 5.tolerance to
6. Step size is smaller than the tolerance. conditionally stop the
algorithm (a default value
is 0.01)