When I remove the minus sign in the return statement in test2_NN_not_working.fake_objective_function theta1 and theta2 have the same values in both runs.
I assume it’s a typo or do you want to negate the operation in the second case?