Elman Network with Logsig Output Neuron

I was trying to create a neural network for a classification task. I used the following line;
net=newelm(elman_input,elman_targets,[ 5,5,1], {'tansig','tansig','logsig'})
but this actually seems to create a network with 4 layers not 3.
size(net.layers) = 4,1
It seems matlab wants to autogenerate the output layer in case I get the dimensions wrong. The autogenerated output neuron has a purelin transfer function and works well.
When I change the output neuron to a logsig transfer function (more appropriate for my particular task) the network behaves extremely badly and I cannot train it (I tried traingdx and trainrp).
anyone else tried an elman network with a logsig output function?
I am keen to avoid the linear output because I want to use a custom performance function that will not respond well to negative outputs.

 채택된 답변

Greg Heath
Greg Heath 2012년 9월 15일

0 개 추천

net=newelm(elman_input,elman_targets,[ 5,5], {'tansig','tansig','logsig'});
The output dimension is automatically obtained from elman_targets.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2011년 6월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by