Learning Constraints for Structured Prediction Using Rectifier Networks