About the exact form of a gaussian kernel Traditionally we define a gaussian function at a point x (assuming mean to be 0) as follows 

$$g_{\sigma}(x) = \frac{1}{\sqrt{2\pi \sigma^{2}}} \exp\left(\frac{x^{2}}{2\sigma^{2}}\right)$$

In some sources however, the exact form is given as follows :

$$g_{\sigma}(x) = \frac{1}{2\pi \sigma^{2}}\exp\left(\frac{x^{2}}{2\sigma^{2}}\right)$$

Why these two forms are used and where which one should be employed ? 
For example, when I am working with images, a little difference produces great numerical variations which have an effect in terms of learning.

A gaussian function is any function of the form
$$
a\,e^{-b(x-c)^2}.
$$
A gaussian probability distribution with mean $0$ and variance $\sigma^2$ corresponds to the first of your definitions.
