Neural Network Toolbox Previous page   Next Page
network

Create a custom neural network

Syntax

net = network

net = network(numInputs,numLayers,biasConnect,inputConnect, layerConnect,outputConnect,targetConnect)

To Get Help

Type help network/network

Description

network creates new custom networks. It is used to create networks that are then customized by functions such as newp, newlin, newff, etc.

network takes these optional arguments (shown with default values):

and returns,

Properties

Architecture properties:

Subobject structure properties:

Function properties:

Parameter properties:

Weight and bias value properties:

Other properties:

Examples

Here is the code to create a network without any inputs and layers, and then set its number of inputs and layer to 1 and 2 respectively.

Here is the code to create the same network with one line of code.

Here is the code to create a 1 input, 2 layer, feed-forward network. Only the first layer will have a bias. An input weight will connect to layer 1 from input 1. A layer weight will connect to layer 2 from layer 1. Layer 2 will be a network output, and have a target.

We can then see the properties of subobjects as follows:

We can get the weight matrices and bias vector as follows:

We can alter the properties of any of these subobjects. Here we change the transfer functions of both layers:

Here we change the number of elements in input 1 to 2, by setting each element's range:

Next we can simulate the network for a two-element input vector:

See Also

sim


Previous page  netsum newc Next page

© 1994-2005 The MathWorks, Inc.