An analysis of optimization problems involving ReLU neural networks