function y=eval_MLP2(x,r,a,b,M)
    [d,n]=size(x);
    y=r(M+1)*ones(1,n);
    for m=1:M
        y=y+r(m)*tanh(a(m,:)*x+b(m));
    end
return
    