Optimization-based learning with bounded error for feedforward neural networks