Hi, i am already sorry for my lack of knowledge. but i am not clear which transfer function is to be used in hidden layers.logsig or tansig?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have this simple program from internet. i guess its simple fitting problem, when i change the transfer function of hidden layer from logsig to tansig it doesnt give any output.infact output is 0; my question is how can i learn which function is to be used in a particular problem for hidden layers.( either tansig or logsig)
close all
clear all
clc
format compact
inputs=[1:6]';
outputs=[-3 2]';
net=network;
net.name='myownneuralnetwork';
net.numinputs=1;
net.numlayers=2;
net.biasconnect=[1;0];
net.inputconnect=[1;0];
net.layerconnect=[0 0;1 0];
net.outputconnect=[0 1];
net.layers{1}.size=5;
net.layers{1}.transferfcn='logsig';
net=configure(net,inputs,outputs);
initial_output = net(inputs)
net.trainfcn='trainlm';
net.performfcn='mse';
net=train(net,inputs,outputs);
final_output = net(inputs)
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Define Shallow Neural Network Architectures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!