SlideShare ist ein Scribd-Unternehmen logo
1 von 15
What are Artificial Neural Networks ?
It is a very powerful , strong as well as a very complicated Machine Learning technique which mimics a
human brain and how it functions.
Like our human brain has millions of neurons in a hierarchy and Network of neurons which are
interconnected with each other via Axons and passes Electrical signals from one layer to another
called synapses. This is how we humans learn things. Whenever we see, hear,feel and think something
a synapse(electrical impulse) is fired from one neuron to another in the hierarchy which enables us to learn ,
remember and memorize things in our daily life since the day we were born.
What are Activation functions and what are it uses in a
Neural Network Model?
• It is also known as Transfer Function. It can also be attached in
between two Neural Networks.
• Activation functions are important for a Artificial Neural Network to learn and
understand the complex patterns.
• The main function of it is to introduce non-linear properties into the network.
• What it does is, it calculates the ‘weighted sum’ and adds direction and decides
whether to ‘fire’ a particular neuron or not
• Their main purpose is to convert a input signal of a node in a A-NN to an output
signal. That output signal now is used as a input in the next layer in the stack.
• The non linear activation function will help the model to
understand the complexity and give accurate results.
The question arises that why can’t we do it without
activating the input signal?
• If we do not apply a Activation function then the output signal would simply be a simple linear
function.
• A linear function is just a polynomial of one degree. Now, a linear equation is easy to solve but
they are limited in their complexity and have less power to learn complex functional mappings
from data.
• A Neural Network without Activation function would simply be a Linear regression Model, which
has limited power and does not performs good most of the times.
• Also without activation function our Neural network would not be able to learn and model other
complicated kinds of data such as images, videos , audio , speech etc.
Types
• The Activation Functions can be basically divided into 2 types-
• Linear Activation Function
• Non-linear Activation Functions
Linear or Identity Activation Function
• As you can see the function is a line or linear. Therefore, the output of the
functions will not be confined between any range.
• Equation : f(x) = x
• Range : (-infinity to infinity)
• It doesn’t help with the complexity or various parameters of usual data that is fed to the neural networks.
• Step Function:
Step Function is one of the simplest kind of activation functions. In
this, we consider a threshold value and if the value of net input
say y is greater than the threshold then the neuron is activated.
• F(x)=1,if x>=0
So why do we need Non-Linearities?
• on-linear functions are those which have degree more than one and
they have a curvature when we plot a Non-Linear function. Now we
need a Neural Network Model to learn and represent almost anything
and any arbitrary complex function which maps inputs to outputs.
• Hence using a non linear Activation we are able to generate non-
linear mappings from inputs to outputs.
Non-linear Activation Function
• It makes it easy for the model to generalize or adapt with variety of data and
to differentiate between the output.
• Derivative or Differential: Change in y-axis w.r.t. change in x-axis.It is
also known as slope.
• The function is differentiable.That means, we can find the slope of
the sigmoid curve at any two points.
• Monotonic function: A function which is either entirely non-increasing
or non-decreasing.
The Nonlinear Activation Functions are mainly divided
on the basis of their range or curves-
• Sigmoid or Logistic Activation Function
• The Sigmoid Function curve looks like a S-shape.
• The main reason why we use sigmoid function is because it exists between (0 to 1). Therefore, it is
especially used for models where we have to predict the probability as an output.Since probability of
anything exists only between the range of 0 and 1, sigmoid is the right choice.
• The logistic sigmoid function can cause a neural network to get stuck at the training time.
The beauty of an exponent is that the value never
reaches zero nor exceed 1 in the above equation.
The large negative numbers are scaled towards 0
and large positive numbers are scaled towards 1.
Disadvantage of sigmoidal function
• major reasons which have made it fall out of popularity -
• Vanishing gradient problem
• Secondly , its output isn’t zero centered. It makes the gradient
updates go too far in different directions. 0 < output < 1, and it makes
optimization harder.
• Sigmoids saturate and kill gradients.
• Sigmoids have slow convergence.
Hyperbolic Tangent function- Tanh :
It’s mathamatical formula is
f(x) = 1 —exp(-2x) / 1 + exp(-2x).
Now it’s output is zero centered because its range in between -1 to 1 i.e -1 < output < 1 .
Hence optimization is easier in this method hence in practice it is always preferred over Sigmoid function .
But still it suffers from Vanishing gradient problem.
•
ReLu- Rectified Linear units
• It was recently proved that it had 6 times improvement in convergence from Tanh function.
• R(x) = max(0,x) i.e if x < 0 , R(x) = 0 and if x >= 0 , R(x) = x.
• Hence it avoids and rectifies vanishing gradient problem.
• But its limitation is that it should only be used within Hidden layers of a Neural Network Model.
• Another problem with ReLu is that some gradients can be fragile during training and can die. It
can cause a weight update which will makes it never activate on any data point again. Simply
saying that ReLu could result in Dead Neurons.
Leaky ReLU:
•
Leaky ReLU function is nothing but an improved version of the ReLU function.Instead of defining
the Relu function as 0 for x less than 0, we define it as a small linear component of x. It can be
defined as:
• F(x)=ax ,x<o
• Else x
• It introduces a small slope to keep the updates
alive.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Back propagation
Back propagationBack propagation
Back propagation
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
Perceptron (neural network)
Perceptron (neural network)Perceptron (neural network)
Perceptron (neural network)
 
Resnet
ResnetResnet
Resnet
 
Perceptron & Neural Networks
Perceptron & Neural NetworksPerceptron & Neural Networks
Perceptron & Neural Networks
 
Soft computing
Soft computingSoft computing
Soft computing
 
Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Autoencoders in Deep Learning
Autoencoders in Deep LearningAutoencoders in Deep Learning
Autoencoders in Deep Learning
 
Artifical Neural Network and its applications
Artifical Neural Network and its applicationsArtifical Neural Network and its applications
Artifical Neural Network and its applications
 
Autoencoder
AutoencoderAutoencoder
Autoencoder
 
Feed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentFeed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descent
 
Activation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural networkActivation functions and Training Algorithms for Deep Neural network
Activation functions and Training Algorithms for Deep Neural network
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic Regression
 
Deep neural networks
Deep neural networksDeep neural networks
Deep neural networks
 
Multilayer perceptron
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
 
Cnn
CnnCnn
Cnn
 
Regularization in deep learning
Regularization in deep learningRegularization in deep learning
Regularization in deep learning
 
An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 

Ähnlich wie Activation function

2011 0480.neural-networks
2011 0480.neural-networks2011 0480.neural-networks
2011 0480.neural-networks
Parneet Kaur
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Simplilearn
 
Machine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester ElectiveMachine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester Elective
MayuraD1
 

Ähnlich wie Activation function (20)

Deep learning
Deep learningDeep learning
Deep learning
 
UNIT 5-ANN.ppt
UNIT 5-ANN.pptUNIT 5-ANN.ppt
UNIT 5-ANN.ppt
 
Activation Function.pptx
Activation Function.pptxActivation Function.pptx
Activation Function.pptx
 
Deep Learning Basics.pptx
Deep Learning Basics.pptxDeep Learning Basics.pptx
Deep Learning Basics.pptx
 
Neural Network_basic_Reza_Lecture_3.pptx
Neural Network_basic_Reza_Lecture_3.pptxNeural Network_basic_Reza_Lecture_3.pptx
Neural Network_basic_Reza_Lecture_3.pptx
 
14_cnn complete.pptx
14_cnn complete.pptx14_cnn complete.pptx
14_cnn complete.pptx
 
NNAF_DRK.pdf
NNAF_DRK.pdfNNAF_DRK.pdf
NNAF_DRK.pdf
 
What are activation functions and why do we need those.pdf
What are activation functions and why do we need those.pdfWhat are activation functions and why do we need those.pdf
What are activation functions and why do we need those.pdf
 
V2.0 open power ai virtual university deep learning and ai introduction
V2.0 open power ai virtual university   deep learning and ai introductionV2.0 open power ai virtual university   deep learning and ai introduction
V2.0 open power ai virtual university deep learning and ai introduction
 
Visualization of Deep Learning
Visualization of Deep LearningVisualization of Deep Learning
Visualization of Deep Learning
 
Activation_function.pptx
Activation_function.pptxActivation_function.pptx
Activation_function.pptx
 
DeepLearning.pdf
DeepLearning.pdfDeepLearning.pdf
DeepLearning.pdf
 
Unit 6: Application of AI
Unit 6: Application of AIUnit 6: Application of AI
Unit 6: Application of AI
 
2011 0480.neural-networks
2011 0480.neural-networks2011 0480.neural-networks
2011 0480.neural-networks
 
Unit 2 ml.pptx
Unit 2 ml.pptxUnit 2 ml.pptx
Unit 2 ml.pptx
 
Neural net and back propagation
Neural net and back propagationNeural net and back propagation
Neural net and back propagation
 
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
Deep Learning Interview Questions And Answers | AI & Deep Learning Interview ...
 
Machine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester ElectiveMachine learning Module-2, 6th Semester Elective
Machine learning Module-2, 6th Semester Elective
 
Introduction to Deep learning and H2O for beginner's
Introduction to Deep learning and H2O for beginner'sIntroduction to Deep learning and H2O for beginner's
Introduction to Deep learning and H2O for beginner's
 
Development of Deep Learning Architecture
Development of Deep Learning ArchitectureDevelopment of Deep Learning Architecture
Development of Deep Learning Architecture
 

Kürzlich hochgeladen

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 

Kürzlich hochgeladen (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 

Activation function

  • 1. What are Artificial Neural Networks ? It is a very powerful , strong as well as a very complicated Machine Learning technique which mimics a human brain and how it functions. Like our human brain has millions of neurons in a hierarchy and Network of neurons which are interconnected with each other via Axons and passes Electrical signals from one layer to another called synapses. This is how we humans learn things. Whenever we see, hear,feel and think something a synapse(electrical impulse) is fired from one neuron to another in the hierarchy which enables us to learn , remember and memorize things in our daily life since the day we were born.
  • 2.
  • 3. What are Activation functions and what are it uses in a Neural Network Model? • It is also known as Transfer Function. It can also be attached in between two Neural Networks. • Activation functions are important for a Artificial Neural Network to learn and understand the complex patterns. • The main function of it is to introduce non-linear properties into the network. • What it does is, it calculates the ‘weighted sum’ and adds direction and decides whether to ‘fire’ a particular neuron or not • Their main purpose is to convert a input signal of a node in a A-NN to an output signal. That output signal now is used as a input in the next layer in the stack. • The non linear activation function will help the model to understand the complexity and give accurate results.
  • 4. The question arises that why can’t we do it without activating the input signal? • If we do not apply a Activation function then the output signal would simply be a simple linear function. • A linear function is just a polynomial of one degree. Now, a linear equation is easy to solve but they are limited in their complexity and have less power to learn complex functional mappings from data. • A Neural Network without Activation function would simply be a Linear regression Model, which has limited power and does not performs good most of the times. • Also without activation function our Neural network would not be able to learn and model other complicated kinds of data such as images, videos , audio , speech etc.
  • 5. Types • The Activation Functions can be basically divided into 2 types- • Linear Activation Function • Non-linear Activation Functions
  • 6. Linear or Identity Activation Function • As you can see the function is a line or linear. Therefore, the output of the functions will not be confined between any range. • Equation : f(x) = x • Range : (-infinity to infinity) • It doesn’t help with the complexity or various parameters of usual data that is fed to the neural networks.
  • 7. • Step Function: Step Function is one of the simplest kind of activation functions. In this, we consider a threshold value and if the value of net input say y is greater than the threshold then the neuron is activated. • F(x)=1,if x>=0
  • 8. So why do we need Non-Linearities? • on-linear functions are those which have degree more than one and they have a curvature when we plot a Non-Linear function. Now we need a Neural Network Model to learn and represent almost anything and any arbitrary complex function which maps inputs to outputs. • Hence using a non linear Activation we are able to generate non- linear mappings from inputs to outputs.
  • 9. Non-linear Activation Function • It makes it easy for the model to generalize or adapt with variety of data and to differentiate between the output.
  • 10. • Derivative or Differential: Change in y-axis w.r.t. change in x-axis.It is also known as slope. • The function is differentiable.That means, we can find the slope of the sigmoid curve at any two points. • Monotonic function: A function which is either entirely non-increasing or non-decreasing.
  • 11. The Nonlinear Activation Functions are mainly divided on the basis of their range or curves- • Sigmoid or Logistic Activation Function • The Sigmoid Function curve looks like a S-shape. • The main reason why we use sigmoid function is because it exists between (0 to 1). Therefore, it is especially used for models where we have to predict the probability as an output.Since probability of anything exists only between the range of 0 and 1, sigmoid is the right choice. • The logistic sigmoid function can cause a neural network to get stuck at the training time. The beauty of an exponent is that the value never reaches zero nor exceed 1 in the above equation. The large negative numbers are scaled towards 0 and large positive numbers are scaled towards 1.
  • 12. Disadvantage of sigmoidal function • major reasons which have made it fall out of popularity - • Vanishing gradient problem • Secondly , its output isn’t zero centered. It makes the gradient updates go too far in different directions. 0 < output < 1, and it makes optimization harder. • Sigmoids saturate and kill gradients. • Sigmoids have slow convergence.
  • 13. Hyperbolic Tangent function- Tanh : It’s mathamatical formula is f(x) = 1 —exp(-2x) / 1 + exp(-2x). Now it’s output is zero centered because its range in between -1 to 1 i.e -1 < output < 1 . Hence optimization is easier in this method hence in practice it is always preferred over Sigmoid function . But still it suffers from Vanishing gradient problem. •
  • 14. ReLu- Rectified Linear units • It was recently proved that it had 6 times improvement in convergence from Tanh function. • R(x) = max(0,x) i.e if x < 0 , R(x) = 0 and if x >= 0 , R(x) = x. • Hence it avoids and rectifies vanishing gradient problem. • But its limitation is that it should only be used within Hidden layers of a Neural Network Model. • Another problem with ReLu is that some gradients can be fragile during training and can die. It can cause a weight update which will makes it never activate on any data point again. Simply saying that ReLu could result in Dead Neurons.
  • 15. Leaky ReLU: • Leaky ReLU function is nothing but an improved version of the ReLU function.Instead of defining the Relu function as 0 for x less than 0, we define it as a small linear component of x. It can be defined as: • F(x)=ax ,x<o • Else x • It introduces a small slope to keep the updates alive.