Getting an error while using a user defined transfer function in newff function
显示 更早的评论
I am trying to use user defined transfer function for achieving the Replicator neural network. As per the below paper, middle hidden layer has should have user defined transfer function to achieve the clustering. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.12.3366&rep=rep1&type=pdf
So in order to achieve the above, i have defined a network with 3 hidden layers with one input and a output layer as below, for the data protection reason, i am unable to post the actual data here so i have defined my input and target outputs as a ones matrix.
net1 = newff(0*ones(1000,2), 1*ones(1000,2),[3,3,3,2],{'tansig','tansig1','tansig','logsig'},'trainlm')
'tansig1' is an user defined transfer function with functionality copied from 'tansig' which is to check the working of user defined function in newff so that later i can modify the function accordingly.
After executing the above code, i am getting a below error,
"Undefined function or variable 'tansig1.name'"
It will be of great help if someone can help me in removing the error or assist me in using the newff with user defined function. I saw a link https://www.researchgate.net/post/Changing_tarnsfer_function_of_neural_network_in_Matlab where it is said that it is achievable but i am ending up with the above mentioned error.
FYI, i am using matlab 2013a.
1 个评论
Greg Heath
2016-9-23
When including numerical examples, please use one of the NN datasets provided by MATLAB just for this purpose:
help nndatasets
doc nndatasests
Hope this helps.
Greg
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!