def get_initial_state_args(value_and_gradients_function,<EOL>initial_position,<EOL>grad_tolerance,<EOL>control_inputs=None):
if control_inputs:<EOL><INDENT>with tf.control_dependencies(control_inputs):<EOL><INDENT>f0, df0 = value_and_gradients_function(initial_position)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>f0, df0 = value_and_gradients_function(initial_position)<EOL><DEDENT>converged = norm(df0, dims=<NUM_LIT:1>) < grad_tolerance<EOL>return dict(<EOL>converged=converged,<EOL>failed=tf.zeros_like(converged),  <EOL>num_iterations=tf.convert_to_tensor(value=<NUM_LIT:0>),<EOL>num_objective_evaluations=tf.convert_to_tensor(value=<NUM_LIT:1>),<EOL>position=initial_position,<EOL>objective_value=f0,<EOL>objective_gradient=df0)<EOL>
Returns a dictionary to populate the initial state of the search procedure.

    Performs an initial convergence check and the first evaluation of the
    objective function.

    Args:
      value_and_gradients_function: A Python callable that accepts a tensor and
        returns a tuple of two tensors: the objective function value and its
        derivative.
      initial_position: The starting point of the search procedure.
      grad_tolerance: The gradient tolerance for the procedure.
      control_inputs: Optional ops used to assert the validity of inputs, these
        are added as control dependencies to execute before the objective
        function is evaluated for the first time.

    Returns:
      An dictionary with values for the following keys:
        converged: True if the convergence check finds that the initial position
          is already an argmin of the objective function.
        failed: Initialized to False.
        num_objective_evaluations: Initialized to 1.
        position: Initialized to the initial position.
        objective_value: Initialized to the value of the objective function at
          the initial position.
        objective_gradient: Initialized to the gradient of the objective
          function at the initial position.