Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

regressionLayer

Create a regression output layer

Syntax

routputlayer = regressionLayer()
routputlayer = regressionLayer('Name',Name)

Description

routputlayer = regressionLayer() returns a regression output layer for a neural network as a RegressionOutputLayer object. For regression problems, you must include a fully connected layer followed by a regression layer at the end of the network. For information on concatenating layers to construct convolutional neural network architecture, see Layer. Predict responses using a trained network using predict.

example

routputlayer = regressionLayer('Name',Name) returns a regression layer with the name specified by Name.

Examples

collapse all

Create a regression output layer with the name 'routput'.

routputlayer = regressionLayer('Name','routput')
routputlayer = 

  RegressionOutputLayer with properties:

             Name: 'routput'
    ResponseNames: {}

   Hyperparameters
     LossFunction: 'mean-squared-error'

The default loss function for regression is mean-squared-error.

Input Arguments

collapse all

Layer name, specified as the comma-separated pair consisting of 'Name' and a character vector. If you do not specify a name, then the software initially specifies the default value '', and automatically assigns the name 'regressionoutputlayer' at training time.

Example: 'Name','routput'

Data Types: char

Output Arguments

collapse all

Regression output layer, returned as a RegressionOutputLayer object.

For information on concatenating layers to construct convolutional neural network architecture, see Layer.

Introduced in R2017a


Was this topic helpful?