-
چهارشنبه 31 فروردین 1390, 02:45 صبح
#25
کاربر جدید
نقل قول: شبکه های عصبی
I am in trouble and need help soon , plz help me if you can
I am trying to solve a problem with Hopfield network in MATLAB.
I have a matrix and fix weight matrix as data. I used the following command to create the Network.
B=[0.1;0.1;0.1]
W=[1 2 3;3 4 0;1 1 3]
>> net = nnt2hop(W,B)
>> T = [-1 -1 1; 1 -1 1]';
>> Ai = T
>> net = nnt2hop(W,B)
>> [Y,Pf,Af] = sim(net,2,[],Ai);
>> Y
Now I should change the transfer function to step function, I create the step function in m-file.
unction [Out] = step(t)
if (t>0)
Out=1;
else
Out=0;
end
But I don’t know how to do it . I try to use adapt command
>>[net,Y,Pf,Af] = adapt(step,T,Ai)
it doesn’t work.
I tried this :
net.layers{1}.transferFcn = 'step';
but it doesn’t work, can anybody give me an advice… thanks in advance
برچسب های این تاپیک
قوانین ایجاد تاپیک در تالار
- شما نمی توانید تاپیک جدید ایجاد کنید
- شما نمی توانید به تاپیک ها پاسخ دهید
- شما نمی توانید ضمیمه ارسال کنید
- شما نمی توانید پاسخ هایتان را ویرایش کنید
-
قوانین سایت