The error in MLP code for XOR

1 Ansicht (letzte 30 Tage)
Vyacheslav
Vyacheslav am 21 Sep. 2014
Beantwortet: Jan am 21 Sep. 2014
Hi everybody! I wrote MLP for XOR, but I got unexpected result! :( I got this: 0.54993...0; 0.45023...0; 0.54962...1; 0.54962...1; Unfortunately I can't find the error in code by myself. The source code in attach. Can anybody help me to clarify where is the error? Thanx!!!

Antworten (1)

Jan
Jan am 21 Sep. 2014
Your code does not have a valid Matlab syntax. There are no comments. The reader has to guess what "MLP" and "XOR" means in this case. It is not clear why you claim that the results are wrong, because you do not mention the values you expect. So perhaps simply your expectations are wrong.
Based on the source code only, it is impossible to guess if it contains bugs. Considering that the initial data are random (|randn()| !), the final values are most likely influenced randomly also.

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by