class_docstr: Judge convergence by the difference between two iterations.
  If the difference is smaller than eps, converge flag will be provided.
class_docstr_tok: ["Judge","convergence","by","the","difference","between","two","iterations",".","If","the","difference","is","smaller","than","eps",",","converge","flag","will","be","provided","."]
code: def is_converge(self, loss):
      logger.debug(
          "In diff converge function, pre_loss: {}, current_loss: {}".format(
              self.pre_loss, loss
          )
      )
  
      converge_flag = False
      if self.pre_loss is None:
          pass
      elif abs(self.pre_loss - loss) < self.eps:
          converge_flag = True
      self.pre_loss = loss
      return converge_flag
  
file_path: FATE/python/fate/ml/utils/_convergence.py
imports: import logging
  import torch
label_desc: Use image node_id 2 for calling the _DiffConverge obj's underlying member method code with example usage: obj.is_converge(loss) and returns: converge_flag