Artificial Intelligence TechC++C++11C++14C++17

What Is A Gaussian Activation Function In A Neural Network?

What is Gaussian Activation Function in Neural Networks? How can we use the Gaussian Function in ANN? Where can we use Gaussian Function in AI technologies? How can I use these functions in my C++ app? Let’s recap the activation function and explain these terms.

What is an activation function in an artificial neural network (ANN)?

An Activation Function ( phi() ) also called a transfer function, or threshold function determines the activation value ( a = phi(sum) ) from a given value (sum) from the Net Input Function . Net Input Function, here the sum is a sum of signals in their weights, and activation function is a new value of this sum with a given function or conditions. In another term. The activation function is a way to transfer the sum of all weighted signals to a new activation value of that signal. There are different activation functions, mostly Linear (Identity), bipolar and logistic (sigmoid) functions are used. The activation function and its types are explained well here.

In C++ (in general in most Programming Languages) you can create your activation function. Note that sum is the result of Net Input Function which calculates the sum of all weighted signals. We will use some as a result of the input function. Here activation value of an artificial neuron (output value) can be written by the activation function as below,

By using this sum Net Input Function Value and phi() activation functions, let’s see some of activation functions in C++; Now Let’s see how we can use Binary Step Function as in this example formula,

Gaussian Activation Function

A Gaussian Activation Function is another activation function that can be used in AI Technologies. Generally, gaussian functions are used in statistics to describe the normal distributions in a given dataset. It is also used in signal processing to define Gaussian filters. Nowadays it is used in image processing where two-dimensional Gaussians are used for Gaussian blurs. In Engineering and mathematics, it is used to solve heat equations and diffusion equations and to define the Weierstrass transform.

Gaussian function often simply referred to as a Gaussian, is a function of the form

This function is simplified as a Gaussian Activation Function as below,

Gaussian Activation Function can be coded as a activation function in C++ as below,

Simple ANN Example with Gaussian Activation Function in C++

Let’s use this Gaussian Activation Function in our generic Simple ANN Example,



Are you ready to try some of this for yourself? Download a free trial of C++ Builder today!

close

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial

Free C++Builder Community Edition

About author

33+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux and some other operating systems. Dr. Yilmaz Yoru was born in 1974, Eskisehir-Turkey. He graduated from the department of Mechanical Engineering of Eskisehir Osmangazi University in 1997. One year later he started to work in the same university as an assistant. He received his MSc and PhD degrees from the same department of the same university. He has married and he is a father of a son. Some of his interests are Programming, Thermodynamics, Fluid Mechanics and Artificial Intelligence. He also likes the graphical 2D & 3D design and high-end innovations.
Related posts
C++C++17Introduction to C++Learn C++

How Do You Run A C++ Program?

CC++Introduction to C++Learn C++

Who Wrote The C Programming Language?

CC++Introduction to C++Language FeatureLearn C++

Is C A High Level Programming Language?

CC++Introduction to C++Learn C++

How To Run A C Program in Command Prompt