# Regression Loss

Regression losses are used in models that calculate a specific value.  For example, a network that learns to model a specific function, such as Sin(x), is considered a regression model and uses a regression loss.

Common regression loss functions include:

Mean Squared Error (MSE) – the mean squared error is calculated by taking the average of the squared differences between target and predicted values.
MyCaffe layer: MeanErrorLossLayer with MEAN_ERROR = MSE

Mean Absolute Error (MAE) – the mean absolute error is calculated by taking the average of the absolute value of the difference between the target and predicted values.  This type of loss is used in models that have many outlier predictions.
MyCaffe layer: MeanErrorLossLayer with MEAN_ERROR = MAE

See the Mean Error Loss sample on Github for an example on how these loss layers are used to solve a simple regression problem.

Euclidean Loss – the Euclidean loss measures the distance between the target and predicted values by calculating the Euclidean distance between the two (e.g., calculating the square root of the sum of differences squared).
MyCaffe layer: EuclideanLossLayer