When I am my training a elman neural network it is working only with 5 or lower no. of hidden layers, as I tried to increase no of layers its giving only 50% accuracy which means network is not trained proparly. what could probably go wraong?

2 views (last 30 days)
I am using R2010a, network is as follows, it is a elman neural network, trained with 'trainrp' and nguyen widrow algorithm is used to generate initial bias values and weights val =
Neural Network object:
architecture:
numInputs: 1
numLayers: 10
biasConnect: [1; 1; 1; 1; 1; 1; 1; 1; 1; 1]
inputConnect: [1; 0; 0; 0; 0; 0; 0; 0; 0; 0]
layerConnect: [10x10 boolean]
outputConnect: [0 0 0 0 0 0 0 0 0 1]
numOutputs: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 1 (read-only)
subobject structures:
inputs: {1x1 cell} of inputs
layers: {10x1 cell} of layers
outputs: {1x10 cell} containing 1 output
biases: {10x1 cell} containing 10 biases
inputWeights: {10x1 cell} containing 1 input weight
layerWeights: {10x10 cell} containing 18 layer weights
functions:
adaptFcn: 'learngd'
divideFcn: 'dividenull'
gradientFcn: 'calcgbtt'
initFcn: 'initlay'
performFcn: 'mse'
plotFcns: {'plotperform','plottrainstate'}
trainFcn: 'trainrp'
parameters:
adaptParam: .lr
divideParam: (none)
gradientParam: (none)
initParam: (none)
performParam: (none)
trainParam: .show, .showWindow, .showCommandLine, .epochs,
.time, .goal, .max_fail, .min_grad,
.delt_inc, .delt_dec, .delta0, .deltamax
weight and bias values:
IW: {10x1 cell} containing 1 input weight matrix
LW: {10x10 cell} containing 18 layer weight matrices
b: {10x1 cell} containing 10 bias vectors
other:
name: ''
userdata: (user information)

Accepted Answer

Greg Heath
Greg Heath on 28 Mar 2014
It is VERY rare to have to use more than one hidden layer. MATLAB's version of ELMAN uses a poorer approximation of timeseries network gradients. Using more layers just makes things worse. From the help documentation:
>> help elmannet
elmannet Elman neural network.
Elman networks are provided for historical interest. For much better
results use narxnet, timedelaynet, or distdelaynet.
Elman networks with two (or more) layers can learn any dynamic
input-output relationship arbitrarily well given enough hidden
neurons and enough input and layer delays. However, Elman networks
use static derivative calculates instead of full dynamic calculates.
This results in a trade off of reduced training calculations, but the risk of poorer accuracy.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!