Effacer les filtres
Effacer les filtres

Specifying Neural Network output range to either 0 or1

2 vues (au cours des 30 derniers jours)
golnoosh
golnoosh le 30 Août 2013
Hello
I have two questions
1. When I train my data with Neural Network, I want the answer to be either 0 or 1, because it means "Faulty/Non-faulty". I used "softmax" & "tansig" for output and hidden layer, Although the out put is really near 1 and 0 but they are not crisp. how can I get exact 1 and 0 output.
2. I tried to change the number of epochs, but whenever I run the program, it runs for 1000 iterations
Thanks In advance
Golnoosh

Réponse acceptée

Greg Heath
Greg Heath le 31 Août 2013
1. With only 2 classes you can replace softmax with logsig for training and use. Then either
a. Use round: help round, doc round
or
b. Replace logsig with hardlim: help hardlim, doc hardlim
2. net.trainParam.epochs = 100;
Hope this helps.
Thank you for formally accepting my answer
Greg

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox 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!

Translated by