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: Function that returns smoothed version of min eigen vector.
docstr_tok: ["Function","that","returns","smoothed","version","of","min","eigen","vector","."]
code: def tf_smooth_eig_vec(self):
      """Function that returns smoothed version of min eigen vector."""
      _, matrix_m = self.dual_object.get_full_psd_matrix()
      # Easier to think in terms of max so negating the matrix
      [eig_vals, eig_vectors] = tf.self_adjoint_eig(-matrix_m)
      exp_eig_vals = tf.exp(
          tf.divide(eig_vals, self.smooth_placeholder)
      )
      scaling_factor = tf.reduce_sum(exp_eig_vals)
      # Multiplying each eig vector by exponential of corresponding eig value
      # Scaling factor normalizes the vector to be unit norm
      eig_vec_smooth = tf.divide(
          tf.matmul(eig_vectors, tf.diag(tf.sqrt(exp_eig_vals))),
          tf.sqrt(scaling_factor),
      )
      return tf.reshape(
          tf.reduce_sum(eig_vec_smooth, axis=1),
          shape=[eig_vec_smooth.shape[0].value, 1],
      )
  
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 3 for calling the Optimization obj's underlying member method code with example usage: obj.tf_smooth_eig_vec() and returns: tf