필터 지우기
필터 지우기

First Neural Network Using XOR

조회 수: 5 (최근 30일)
Darryl
Darryl 2013년 2월 25일
I am trying to implement a simple XOR network. All is okay once the input and target data has been setup, but as soon as I try and train the network I get the Neural Network Training Tool window open, but the "stop training" and "cancel" button are shaded out with "minimum gradient reached". As soon as I try and simulate the network, the XOR_NET_output data is wrong and there seems to be error data within the XOR_NET_errors.
I can provide more data if necessary.
  댓글 수: 1
Shashank Prasanna
Shashank Prasanna 2013년 2월 25일
Since this is a fairly simple setup, could you share your data and the lines of code you've written? It will be easier to look into the issue.

댓글을 달려면 로그인하십시오.

채택된 답변

Greg Heath
Greg Heath 2013년 2월 27일
편집: Greg Heath 2013년 2월 27일
I have many posts on the NEWSGROUP, ANSWERS and comp.ai.neural-nets re XOR. Most can be retreived by searching on
greg xor
The minimal configuration has a 2-2-1 topology with Nw = (2+1)*2+(2+1)*1 = 9 unknown weights to be estimated with only 4 equations. Consequently, there are an infinite number of solutions.
Nevertheless, I recall a success rate of only ~ 70% when training from a random set of initial weights generated by MATLAB's default NW algorithm.
So, just try 10 or more different random weight initializations. You should get at least 5 successful solutions.
Hope this helps.
Thank you for formally accepting my answer.
Greg

추가 답변 (1개)

Mohan
Mohan 2013년 2월 26일
The implementation of the XOR with neural networks is clearly explained with Matlab code in "Introduction to Neural Networks Using Matlab 6.0 " by S. N. Sivanandam, S. N Deepa

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by