function [a,b,r]=learn_myMLP(x,y,M)
%initilization
[N,d]=size(x);
a=0.1*(rand(M,d)-0.5);
r=0.1*(rand(1,M+1)-0.5);
b=0.1*(rand(1,M)-0.5);
eta=0.01;
while 1%halting_condition
% calculate delta_theta    
    da=der_a(x,y,r,a,b,M);
    db=der_b(x,y,r,a,b,M);
    dr=der_r(x,y,r,a,b,M);
    a=a-eta*da;
    .
    .
    theta=[a b r];
    y_hat=eval_MLP2(x,r,a,b,M);
    e=mean((y_hat-y).^2);
    fprintf('E=%f\n',e);
    %delta_r
% update theta
end

return
function db=der_b(x,y,r,a,b,M)
for m=1:M
    db(m)=
end
return

function da=der_a(x,y,r,a,b,M)
for m=1:M
    da(m)=
end
return