function res = simple_mlp_tanhderiv(mat)
  res = 1 - mat .* mat;
