Constraint-Based Regularization of Neural Networks