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: Function that provides matrix product interface with PSD matrix.
  
  Args:
    vector: the vector to be multiplied with matrix M
  
  Returns:
    result_product: Matrix product of M and vector
docstr_tok: ["Function","that","provides","matrix","product","interface","with","PSD","matrix",".","Args",":","vector",":","the","vector","to","be","multiplied","with","matrix","M","Returns",":","result_product",":","Matrix","product","of","M","and","vector"]
code: def get_psd_product(self, vector, dtype=None):
      """Function that provides matrix product interface with PSD matrix.
  
      Args:
        vector: the vector to be multiplied with matrix M
  
      Returns:
        result_product: Matrix product of M and vector
      """
      # For convenience, think of x as [\alpha, \beta]
      if dtype is None:
          dtype = self.nn_dtype
      vector = tf.cast(vector, self.nn_dtype)
      alpha = tf.reshape(vector[0], shape=[1, 1])
      beta = vector[1:]
      # Computing the product of matrix_h with beta part of vector
      # At first layer, h is simply diagonal
      h_beta = self.get_h_product(beta)
  
      # Constructing final result using vector_g
      result = tf.concat(
          [
              alpha * self.nu
              + tf.reduce_sum(tf.multiply(beta, self.vector_g)),
              tf.multiply(alpha, self.vector_g) + h_beta,
          ],
          axis=0,
      )
      return tf.cast(result, dtype)
  
file_path: cleverhans/cleverhans_v3.1.0/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 6 for calling the DualFormulation obj's underlying member method code with example usage: obj.get_psd_product(vector, dtype) and returns: tf