class_docstr: The weights' gradient statistic tracker will estimate the absolute mean (i.e. the mean of the absolute values of
  the weights' gradients), running absolute mean variance (i.e. the variance of the absolute mean), min, absolute min,
   max and absolute max per layer. The tracker is using the `Welford's online algorithm
   <https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm>`_
  to estimate the running mean and running variance of the absolute weights' gradients.
  
  Args:
      number_layers (int): The number of layers to track stats on.
class_docstr_tok: ["The","weights","'","gradient","statistic","tracker","will","estimate","the","absolute","mean","(","i.e",".","the","mean","of","the","absolute","values","of","the","weights","'","gradients",")",",","running","absolute","mean","variance","(","i.e",".","the","variance","of","the","absolute","mean",")",",","min",",","absolute","min",",","max","and","absolute","max","per","layer",".","The","tracker","is","using","the","`","Welford","'s","online","algorithm","<","https",":","\/\/en.wikipedia.org\/wiki\/Algorithms_for_calculating_variance","#","Welford's_online_algorithm",">","`","_","to","estimate","the","running","mean","and","running","variance","of","the","absolute","weights","'","gradients",".","Args",":","number_layers","(","int",")",":","The","number","of","layers","to","track","stats","on","."]
docstr: Get the accumulated statistics of the layers.
  
  Note: This will reset the gradient tracker statistics values.
  
  Args:
      layer_names (List[str]): The names of the layer to get statistics from.
  
  Returns:
      A dictionary where the keys are the layer names and the values are the statistics of the layer.
      The statistics is also a dictionary where the keys are the logged statistics
      (mean, mean +/- std deviation, min, absolute min, max and the absolute max) and the values are
      the corresponding statistic values.
docstr_tok: ["Get","the","accumulated","statistics","of","the","layers",".","Note",":","This","will","reset","the","gradient","tracker","statistics","values",".","Args",":","layer_names","(","List","[","str","]",")",":","The","names","of","the","layer","to","get","statistics","from",".","Returns",":","A","dictionary","where","the","keys","are","the","layer","names","and","the","values","are","the","statistics","of","the","layer",".","The","statistics","is","also","a","dictionary","where","the","keys","are","the","logged","statistics","(","mean",",","mean","+\/-","std","deviation",",","min",",","absolute","min",",","max","and","the","absolute","max",")","and","the","values","are","the","corresponding","statistic","values","."]
code: def get_stats(self, layer_names: List[str]) -> Dict:
      """
      Get the accumulated statistics of the layers.
  
      Note: This will reset the gradient tracker statistics values.
  
      Args:
          layer_names (List[str]): The names of the layer to get statistics from.
  
      Returns:
          A dictionary where the keys are the layer names and the values are the statistics of the layer.
          The statistics is also a dictionary where the keys are the logged statistics
          (mean, mean +/- std deviation, min, absolute min, max and the absolute max) and the values are
          the corresponding statistic values.
      """
      formatted_stats = {}
      for index, layer_name in enumerate(layer_names):
          stats = {
              "mean": self.running_abs_mean[index],
              "mean_std_dev_up": self.running_abs_mean[index]
              + np.sqrt(self.running_abs_mean_var[index]),
              "mean_std_dev_down": self.running_abs_mean[index]
              - np.sqrt(self.running_abs_mean_var[index]),
              "min": self.running_min[index],
              "abs_min": self.running_abs_min[index],
              "max": self.running_max[index],
              "abs_max": self.running_abs_max[index],
          }
  
          formatted_stats.update({layer_name: stats})
  
      self.reset()
      return formatted_stats
  
imports: from typing import Dict, Iterable, List, Tuple
  import numpy
  import torch
  from poutyne.framework.callbacks.callbacks import Callback
label_desc: Use image node_id 3 for calling the WeightsGradientsStatsTracker obj's underlying member method code with example usage: obj.get_stats(layer_names) and returns: formatted_stats