Borrar filtros
Borrar filtros

Specifying Neural Network output range to either 0 or1

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Greg Heath
Greg Heath el 31 de Ag. de 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

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by