Contents

feedforwardnet

Feedforward neural network

Syntax

feedforwardnet(hiddenSizes,trainFcn)

Description

Feedforward networks consist of a series of layers. The first layer has a connection from the network input. Each subsequent layer has a connection from the previous layer. The final layer produces the network's output.

Feedforward networks can be used for any kind of input to output mapping. A feedforward network with one hidden layer and enough neurons in the hidden layers, can fit any finite input-output mapping problem.

Specialized versions of the feedforward network include fitting (fitnet) and pattern recognition (patternnet) networks. A variation on the feedforward network is the cascade forward network (cascadeforwardnet) which has additional connections from the input to every layer, and from each layer to all following layers.

feedforwardnet(hiddenSizes,trainFcn) takes these arguments,

hiddenSizes

Row vector of one or more hidden layer sizes (default = 10)

trainFcn

Training function (default = 'trainlm')

and returns a feedforward neural network.

Examples

Here a feedforward neural network is used to solve a simple problem.

[x,t] = simplefit_dataset;
net = feedforwardnet(10);
net = train(net,x,t);
view(net)
y = net(x);
perf = perform(net,y,t)
perf =

   1.4639e-04

Was this topic helpful?