Why the writer of this article divided the mean square error formula by 2 instead of MxN?

40 Views Asked by At

The link of the article, the intuition he made in his article is very convincing the understand the relation between mean square error and Gaussian distribution. but he changed the formula of the MSE to be divided by 2 instead of the number of pixels (MxN). which I don't understand is it for the reason of proving or it can be used in this way ?

1

There are 1 best solutions below

9
On

"where $M$ is the total number of examples". Except for "images" in the title, there is no reference to pixels or images in this document. His $L_2$ loss definition is for $M$ samples of $N$-dimensional vectors. The $\frac{1}{2}$ here is a little strange, but if you use this scale factor in all your losses, it has no net effect -- half of bigger is still bigger than half of smaller. If your model is pixels, these could be $N=1$ (intensity) or $N = 3$ (RGB), or other choices, and $M$ is the number of pixels.