A Neural Network Approach for Global Optimization with Applications to Nonlinear Least Square Problems