function act = activation_function(fu); act = fu; for i = 1:size(fu,1) for j = 1:size(fu,2) u = fu(i,j); if (u<0.0) act(i,j) = (1./(1.+exp(-u))); else act(i,j) = 0.5 * sqrt( 1.0 + u ); end end end