Switch optimizer to fmin_cg