I'm trying to implement an Hopfield Network for pictures of 32x32 bits either 1 or -1;
I have these 3 pictures and I transform each of them in a vector of 1024 elements. Then I take the 3 vectors and I build a matrix M:
U = [v1 v2 v3]
So I compute:
M = (U*U')/1024
where M is a matrix of 1024*1024 elements and I set the diagonal to 0. in order to get the correlation matrix scaled by 1024 (Hebbian rule).
Now, theoretically each vector v should be a fixpoint. So I compute M*v. I take the sign and I compare with v. The problem is that they are different, so v is not a fixpoint. What am I doing wrong?