Belle II Software  release-08-01-10
early_stopping Class Reference

Public Member Functions

def __init__ (self)
 
def check (self, cost)
 

Public Attributes

 counter
 counts how many times training is not getting better
 
 best_result
 saves best training result
 

Detailed Description

 Using class to stop training early if it's not getting better

Definition at line 20 of file relations.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
 init class 

Definition at line 23 of file relations.py.

23  def __init__(self):
24  """ init class """
25 
26  self.counter = 0
27 
28  self.best_result = np.inf
29 

Member Function Documentation

◆ check()

def check (   self,
  cost 
)
Check if validation result is better than the best validation result.
Decide if training should be continued.

Definition at line 30 of file relations.py.


The documentation for this class was generated from the following file: