Neural networks and flexible approximations