Hopfield Neural net cannot store more than 2 association patterns
1 回表示 (過去 30 日間)
古いコメントを表示
I'm just trying to implement a simple discrete Hopfield net using matlab but there is a problem with my result. As I present two patterns to be stored in my net everything works great and I can retrieve the correct association pattern given a noisy input, but if I just decide to store or train more than 2 patterns to my net, by presenting any noisy input,the net converges to a nonsense result, I searched through the net and I noticed it may be because of "Spurious States" and "Spin Glass" but there is no tip or guidance for dealing with this issue.
I would be thankful to guide me in this case, here is my taring code based on Hebb learning rule (presented in the book written by Fausett)
function trainBtn_Callback(hObject, ~, handles)
weightMatrix = zeros(100,100);
for k = 1:size(handles.associations,1) %train the network for each association
currentA = handles.associations(k,:); %specify the associationa pattern which
for i = 1:100
for j=1:100
if i ~= j
w(i,j) = currentA(i).*currentA(j); %learning the weight matrix by Hebb
end
end
end
for i=1:100
w(i,i) = 0;
end
weightMatrix = weightMatrix + w; % sum of the calculated weight matrices
end
handles.w = weightMatrix;
guidata(hObject,handles);
% code
end
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!