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 returns the tf graph corresponding to the entire matrix M.
  
  Returns:
    matrix_h: unrolled version of tf matrix corresponding to H
    matrix_m: unrolled tf matrix corresponding to M
docstr_tok: ["Function","that","returns","the","tf","graph","corresponding","to","the","entire","matrix","M.","Returns",":","matrix_h",":","unrolled","version","of","tf","matrix","corresponding","to","H","matrix_m",":","unrolled","tf","matrix","corresponding","to","M"]
code: def get_full_psd_matrix(self):
      """Function that returns the tf graph corresponding to the entire matrix M.
  
      Returns:
        matrix_h: unrolled version of tf matrix corresponding to H
        matrix_m: unrolled tf matrix corresponding to M
      """
      if self.matrix_m is not None:
          return self.matrix_h, self.matrix_m
  
      # Computing the matrix term
      h_columns = []
      for i in range(self.nn_params.num_hidden_layers + 1):
          current_col_elems = []
          for j in range(i):
              current_col_elems.append(
                  tf.zeros(
                      [self.nn_params.sizes[j], self.nn_params.sizes[i]]
                  )
              )
  
          # For the first layer, there is no relu constraint
          if i == 0:
              current_col_elems.append(utils.diag(self.lambda_lu[i]))
          else:
              current_col_elems.append(
                  utils.diag(self.lambda_lu[i] + self.lambda_quad[i])
              )
          if i < self.nn_params.num_hidden_layers:
              current_col_elems.append(
                  tf.matmul(
                      utils.diag(-1 * self.lambda_quad[i + 1]),
                      self.nn_params.weights[i],
                  )
              )
          for j in range(i + 2, self.nn_params.num_hidden_layers + 1):
              current_col_elems.append(
                  tf.zeros(
                      [self.nn_params.sizes[j], self.nn_params.sizes[i]]
                  )
              )
          current_column = tf.concat(current_col_elems, 0)
          h_columns.append(current_column)
  
      self.matrix_h = tf.concat(h_columns, 1)
      self.matrix_h = self.matrix_h + tf.transpose(self.matrix_h)
  
      self.matrix_m = tf.concat(
          [
              tf.concat(
                  [
                      tf.reshape(self.nu, (1, 1)),
                      tf.transpose(self.vector_g),
                  ],
                  axis=1,
              ),
              tf.concat([self.vector_g, self.matrix_h], axis=1),
          ],
          axis=0,
      )
      return self.matrix_h, self.matrix_m
  
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 7 for calling the DualFormulation obj's underlying member method code with example usage: obj.get_full_psd_matrix() and returns: self,  self, self,  self