class_docstr: Class that sets up and runs the optimization of dual_formulation
class_docstr_tok: ["Class","that","sets","up","and","runs","the","optimization","of","dual_formulation"]
docstr: Computes scipy estimate of min eigenvalue for matrix M.
  
  Returns:
    eig_vec: Minimum absolute eigen value
    eig_val: Corresponding eigen vector
docstr_tok: ["Computes","scipy","estimate","of","min","eigenvalue","for","matrix","M.","Returns",":","eig_vec",":","Minimum","absolute","eigen","value","eig_val",":","Corresponding","eigen","vector"]
code: def get_scipy_eig_vec(self):
      """Computes scipy estimate of min eigenvalue for matrix M.
  
      Returns:
        eig_vec: Minimum absolute eigen value
        eig_val: Corresponding eigen vector
      """
      if not self.params["has_conv"]:
          matrix_m = self.sess.run(self.dual_object.matrix_m)
          min_eig_vec_val, estimated_eigen_vector = eigs(
              matrix_m, k=1, which="SR", tol=1e-4
          )
          min_eig_vec_val = np.reshape(np.real(min_eig_vec_val), [1, 1])
          return (
              np.reshape(estimated_eigen_vector, [-1, 1]),
              min_eig_vec_val,
          )
      else:
          dim = self.dual_object.matrix_m_dimension
          input_vector = tf.placeholder(tf.float32, shape=(dim, 1))
          output_vector = self.dual_object.get_psd_product(input_vector)
  
          def np_vector_prod_fn(np_vector):
              np_vector = np.reshape(np_vector, [-1, 1])
              output_np_vector = self.sess.run(
                  output_vector, feed_dict={input_vector: np_vector}
              )
              return output_np_vector
  
          linear_operator = LinearOperator(
              (dim, dim), matvec=np_vector_prod_fn
          )
          # Performing shift invert scipy operation when eig val estimate is available
          min_eig_vec_val, estimated_eigen_vector = eigs(
              linear_operator, k=1, which="SR", tol=1e-4
          )
          min_eig_vec_val = np.reshape(np.real(min_eig_vec_val), [1, 1])
          return (
              np.reshape(estimated_eigen_vector, [-1, 1]),
              min_eig_vec_val,
          )
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans/experimental/certification/optimization.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import numpy
  from scipy.sparse.linalg import eigs, LinearOperator
  import tensorflow
  from tensorflow.contrib import autograph
  from cleverhans.experimental.certification import utils
label_desc: Use image node_id 5 for calling the Optimization obj's underlying member method code with example usage: obj.get_scipy_eig_vec() and returns: np,  min_eig_vec_val, np,  min_eig_vec_val, output_np_vector