class_docstr: ```
  Tracks (and plots) the change in loss of a Keras model as learning rate is gradually increased.
  Used to visually identify a good learning rate, given model and data.
  Reference:
      Original Paper: https://arxiv.org/abs/1506.01186
  ```
class_docstr_tok: ["``","`","Tracks","(","and","plots",")","the","change","in","loss","of","a","Keras","model","as","learning","rate","is","gradually","increased",".","Used","to","visually","identify","a","good","learning","rate",",","given","model","and","data",".","Reference",":","Original","Paper",":","https",":","\/\/arxiv.org\/abs\/1506.01186","``","`"]
docstr: ```
  generates the index associated with minum numerical gradient and the
  index associated with minum loss.
  Stored as mg and ml respectively
  ```
docstr_tok: ["``","`","generates","the","index","associated","with","minum","numerical","gradient","and","the","index","associated","with","minum","loss",".","Stored","as","mg","and","ml","respectively","``","`"]
code: def _compute_stats(self):
      """
      ```
      generates the index associated with minum numerical gradient and the
      index associated with minum loss.
      Stored as mg and ml respectively
      ```
      """
      # this code was adapted from fastai: https://github.com/fastai/fastai
      self.ml = np.argmin(self.losses)
      try:
          self.mg = (
              np.gradient(np.array(self.losses[32 : self.ml]))
          ).argmin()
      except Exception as e:
          self.mg = None
          warnings.warn(str(e))
      return
  
file_path: ktrain/ktrain/lroptimize/lrfinder.py
imports: from ..None import utils
  from ..imports import *
label_desc: Use image node_id 6 for calling the LRFinder obj's underlying member method code with example usage: obj._compute_stats() without return types