Comparison of two neural network optimization approaches