docstr: Return the eigen values from the stats
  
  :param stats: ([TensorFlow Tensor]) The stats
  :return: ([TensorFlow Tensor]) The stats eigen values
docstr_tok: ["Return","the","eigen","values","from","the","stats",":","param","stats",":","(","[","TensorFlow","Tensor","]",")","The","stats",":","return",":","(","[","TensorFlow","Tensor","]",")","The","stats","eigen","values"]
code: def get_stats_eigen(self, stats=None):
      """
      Return the eigen values from the stats
  
      :param stats: ([TensorFlow Tensor]) The stats
      :return: ([TensorFlow Tensor]) The stats eigen values
      """
      if len(self.stats_eigen) == 0:
          stats_eigen = {}
          if stats is None:
              stats = self.stats
  
          tmp_eigen_cache = {}
          with tf.device("/cpu:0"):
              for var in stats:
                  for key in [
                      "fprop_concat_stats",
                      "bprop_concat_stats",
                  ]:
                      for stats_var in stats[var][key]:
                          if stats_var not in tmp_eigen_cache:
                              stats_dim = stats_var.get_shape()[1].value
                              eigen_values = tf.Variable(
                                  tf.ones([stats_dim]),
                                  name="KFAC_FAC/"
                                  + stats_var.name.split(":")[0]
                                  + "/e",
                                  trainable=False,
                              )
                              eigen_vectors = tf.Variable(
                                  tf.diag(tf.ones([stats_dim])),
                                  name="KFAC_FAC/"
                                  + stats_var.name.split(":")[0]
                                  + "/Q",
                                  trainable=False,
                              )
                              stats_eigen[stats_var] = {
                                  "e": eigen_values,
                                  "Q": eigen_vectors,
                              }
                              tmp_eigen_cache[stats_var] = stats_eigen[
                                  stats_var
                              ]
                          else:
                              stats_eigen[stats_var] = tmp_eigen_cache[
                                  stats_var
                              ]
          self.stats_eigen = stats_eigen
      return self.stats_eigen
  
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 8 for calling the KfacOptimizer obj's underlying member method code with example usage: obj.get_stats_eigen(stats) and returns: self