from tensorflow.python.framework import ops

                hessians[a][b][c], where [a] runs over the epoch. For fixed [a], hessians stores the value of the hessian matrix
                evaluated at the critical points; this is a nxn matrix indexed by [b][c]. The size of the matrix is predetermined
                by the number of parameters in the network.

    residuals -- list containing the value of the residuals at predefinite training intervals. As we are only interested in the
                 sign of the residuals, we define it as the difference between the predicted output \hat{y} (an in the code)
                 and the training labels y (Y in the code).
    """

    ops.reset_default_graph()                      # reset the computational graph
    tf.set_random_seed(1)                          # to keep consistent results

    #----------training/test set features-------------------------

    X_tr = np.transpose(X_train)                    # the transpose is taken to adapt to TF convenntion. This is also
    f , m = X_tr.shape                              # f: number of features, m: number of training examples

    X_tst = np.transpose(X_test)                    # the transpose is taken to adapt to TF convenntion. This is also
