The error in MLP code for XOR

1 vue (au cours des 30 derniers jours)
Vyacheslav
Vyacheslav le 21 Sep 2014
Réponse apportée : Jan le 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!!!

Réponses (1)

Jan
Jan le 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.

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by