Learning based convex approximation for constrained parametric optimization