Half mean squared error

The half mean squared error operation computes the half mean squared error loss between network predictions and target values for regression tasks.

The loss is calculated using the following formula

$$\text{loss}=\frac{1}{2N}{\displaystyle \sum _{i=1}^{M}{({X}_{i}-{T}_{i})}^{2}}$$

where *X _{i}* is the network response,

This function computes the half mean squared error loss between predictions and targets
stored as `dlarray`

data. If
you want to calculate the half mean squared error loss within a `layerGraph`

object
or `Layer`

array for use
with `trainNetwork`

, use the following layer:

`crossentropy`

| `dlarray`

| `dlfeval`

| `dlgradient`

| `sigmoid`