class_docstr: DualFormulation is a class that creates the dual objective function
  and access to matrix vector products for the matrix that is constrained
  to be Positive semidefinite
class_docstr_tok: ["DualFormulation","is","a","class","that","creates","the","dual","objective","function","and","access","to","matrix","vector","products","for","the","matrix","that","is","constrained","to","be","Positive","semidefinite"]
docstr: Computes matrices T and V using the Lanczos algorithm.
  
  Args:
    k: number of iterations and dimensionality of the tridiagonal matrix
  Returns:
    eig_vec: eigen vector corresponding to min eigenvalue
docstr_tok: ["Computes","matrices","T","and","V","using","the","Lanczos","algorithm",".","Args",":","k",":","number","of","iterations","and","dimensionality","of","the","tridiagonal","matrix","Returns",":","eig_vec",":","eigen","vector","corresponding","to","min","eigenvalue"]
code: def construct_lanczos_params(self):
      """Computes matrices T and V using the Lanczos algorithm.
  
      Args:
        k: number of iterations and dimensionality of the tridiagonal matrix
      Returns:
        eig_vec: eigen vector corresponding to min eigenvalue
      """
      # Using autograph to automatically handle
      # the control flow of minimum_eigen_vector
      self.min_eigen_vec = autograph.to_graph(
          utils.tf_lanczos_smallest_eigval
      )
  
      def _m_vector_prod_fn(x):
          return self.get_psd_product(x, dtype=self.lanczos_dtype)
  
      def _h_vector_prod_fn(x):
          return self.get_h_product(x, dtype=self.lanczos_dtype)
  
      # Construct nodes for computing eigenvalue of M
      self.m_min_vec_estimate = np.zeros(
          shape=(self.matrix_m_dimension, 1), dtype=np.float64
      )
      zeros_m = tf.zeros(
          shape=(self.matrix_m_dimension, 1), dtype=tf.float64
      )
      self.m_min_vec_ph = tf.placeholder_with_default(
          input=zeros_m,
          shape=(self.matrix_m_dimension, 1),
          name="m_min_vec_ph",
      )
      self.m_min_eig, self.m_min_vec = self.min_eigen_vec(
          _m_vector_prod_fn,
          self.matrix_m_dimension,
          self.m_min_vec_ph,
          self.lzs_params["max_iter"],
          dtype=self.lanczos_dtype,
      )
      self.m_min_eig = tf.cast(self.m_min_eig, self.nn_dtype)
      self.m_min_vec = tf.cast(self.m_min_vec, self.nn_dtype)
  
      self.h_min_vec_estimate = np.zeros(
          shape=(self.matrix_m_dimension - 1, 1), dtype=np.float64
      )
      zeros_h = tf.zeros(
          shape=(self.matrix_m_dimension - 1, 1), dtype=tf.float64
      )
      self.h_min_vec_ph = tf.placeholder_with_default(
          input=zeros_h,
          shape=(self.matrix_m_dimension - 1, 1),
          name="h_min_vec_ph",
      )
      self.h_min_eig, self.h_min_vec = self.min_eigen_vec(
          _h_vector_prod_fn,
          self.matrix_m_dimension - 1,
          self.h_min_vec_ph,
          self.lzs_params["max_iter"],
          dtype=self.lanczos_dtype,
      )
      self.h_min_eig = tf.cast(self.h_min_eig, self.nn_dtype)
      self.h_min_vec = tf.cast(self.h_min_vec, self.nn_dtype)
  
file_path: cleverhans/cleverhans/experimental/certification/dual_formulation.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from scipy.sparse.linalg import eigs, LinearOperator
  import tensorflow
  from tensorflow.contrib import autograph
  import numpy
  from cleverhans.experimental.certification import utils
label_desc: Use image node_id 3 for calling the DualFormulation obj's underlying member method code with example usage: obj.construct_lanczos_params() and returns: self, self