Training Neural Networks with Discrete Optimization Solvers