The error in MLP code for XOR

1 visualizzazione (ultimi 30 giorni)
Vyacheslav
Vyacheslav il 21 Set 2014
Risposto: Jan il 21 Set 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!!!

Risposte (1)

Jan
Jan il 21 Set 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.

Categorie

Scopri di più su Resizing and Reshaping Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by