# regressionLayer

## 说明

layer = regressionLayer 将神经网络的回归输出层以 RegressionOutputLayer 对象形式返回。

layer = regressionLayer(Name,Value) 使用名称-值对组设置可选的 NameResponseNames 属性。例如，regressionLayer('Name','output') 创建一个名为 'output' 的回归层。用单引号将每个属性名称引起来。

## 示例

layer = regressionLayer('Name','routput')
layer =
RegressionOutputLayer with properties:

Name: 'routput'
ResponseNames: {}

Hyperparameters
LossFunction: 'mean-squared-error'

layers = [ ...
imageInputLayer([28 28 1])
convolution2dLayer(12,25)
reluLayer
fullyConnectedLayer(1)
regressionLayer]
layers =
5x1 Layer array with layers:

1   ''   Image Input         28x28x1 images with 'zerocenter' normalization
2   ''   2-D Convolution     25 12x12 convolutions with stride [1  1] and padding [0  0  0  0]
3   ''   ReLU                ReLU
4   ''   Fully Connected     1 fully connected layer
5   ''   Regression Output   mean-squared-error

## 详细信息

### 回归输出层

$\text{MSE}=\sum _{i=1}^{R}\frac{{\left({t}_{i}-{y}_{i}\right)}^{2}}{R},$

$\text{loss}=\frac{1}{2}\sum _{i=1}^{R}{\left({t}_{i}-{y}_{i}\right)}^{2}.$

$\text{loss}=\frac{1}{2}\sum _{p=1}^{HWC}{\left({t}_{p}-{y}_{p}\right)}^{2},$

$\text{loss}=\frac{1}{2S}\sum _{i=1}^{S}\sum _{j=1}^{R}{\left({t}_{ij}-{y}_{ij}\right)}^{2},$