Neural Network Toolbox |
Calculate layer errors for one time step
Syntax
Description
This function calculates the errors of each layer in response to layer outputs and targets, for a single time step. Calculating errors for a single time step is useful for sequential iterative algorithms such as trains
which need to calculate the network response for each time step individually.
Examples
Here we create a linear network with a single input element ranging from 0 to 1, two neurons, and a tap delay on the input with taps at zero, two, and four time steps. The network is also given a recurrent connection from layer 1 to itself with tap delays of [1 2].
Here is a single (Q = 1
) input sequence P with five time steps (TS = 5
), and the four initial input delay conditions Pi
, combined inputs Pc
, and delayed inputs Pd
.
Here the two initial layer delay conditions for each of the two neurons are defined, and the networks combined outputs Ac
and other signals are calculated.
Here we define the layer targets for the two neurons for each of the five time steps, and calculate the layer error using the first time step layer output Ac(:,5)
(The five is found by adding the number of layer delays, 2, to the time step 1.), and the first time step targets Tl(:,1)
.
Here we view the network's error for layer 1.
calce | calcgx |
© 1994-2005 The MathWorks, Inc.