Tailored max-out networks for learning convex PWQ functions