Specifying Neural Network output range to either 0 or1
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Greg Heath
2013년 8월 31일
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
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!