docstr: compute the eigen decomp using copied var stats to avoid concurrent read/write from other queue
  
  :return: ([TensorFlow Tensor]) update operations
docstr_tok: ["compute","the","eigen","decomp","using","copied","var","stats","to","avoid","concurrent","read\/write","from","other","queue",":","return",":","(","[","TensorFlow","Tensor","]",")","update","operations"]
code: def compute_stats_eigen(self):
      """
      compute the eigen decomp using copied var stats to avoid concurrent read/write from other queue
  
      :return: ([TensorFlow Tensor]) update operations
      """
      # TODO: figure out why this op has delays (possibly moving eigenvectors around?)
      with tf.device("/cpu:0"):
          stats_eigen = self.stats_eigen
          computed_eigen = {}
          eigen_reverse_lookup = {}
          update_ops = []
          # sync copied stats
          with tf.control_dependencies([]):
              for stats_var in stats_eigen:
                  if stats_var not in computed_eigen:
                      eigen_decomposition = tf.self_adjoint_eig(
                          stats_var
                      )
                      eigen_values = eigen_decomposition[0]
                      eigen_vectors = eigen_decomposition[1]
                      if self._use_float64:
                          eigen_values = tf.cast(
                              eigen_values, tf.float64
                          )
                          eigen_vectors = tf.cast(
                              eigen_vectors, tf.float64
                          )
                      update_ops.append(eigen_values)
                      update_ops.append(eigen_vectors)
                      computed_eigen[stats_var] = {
                          "e": eigen_values,
                          "Q": eigen_vectors,
                      }
                      eigen_reverse_lookup[eigen_values] = stats_eigen[
                          stats_var
                      ]["e"]
                      eigen_reverse_lookup[eigen_vectors] = stats_eigen[
                          stats_var
                      ]["Q"]
  
          self.eigen_reverse_lookup = eigen_reverse_lookup
          self.eigen_update_list = update_ops
  
          if KFAC_DEBUG:
              self.eigen_update_list = [item for item in update_ops]
              with tf.control_dependencies(update_ops):
                  update_ops.append(
                      tf.Print(
                          tf.constant(0.0),
                          [
                              tf.convert_to_tensor(
                                  "computed factor eigen"
                              )
                          ],
                      )
                  )
  
      return update_ops
  
imports: import re
  from functools import reduce
  import tensorflow
  import numpy
  from stable_baselines.acktr.kfac_utils import detect_min_val, factor_reshape, gmatmul
label_desc: Use image node_id 9 for calling the KfacOptimizer obj's underlying member method code with example usage: obj.compute_stats_eigen() and returns: update_ops