def stop_training(log_likelihood_change, num_iterations):
 if VERBOSE:
  print(('ll change: %f' % log_likelihood_change))
 if (log_likelihood_change < 0.01):
  return 1
 elif (num_iterations >= 10):
  return 1
 else:
  return 0

def stop_training ( log_likelihood_change , num_iterations ) : if VERBOSE : print ( ( 'll change: %f' % log_likelihood_change ) ) if ( log_likelihood_change < 0.01 ) : return 1 elif ( num_iterations >= 10 ) : return 1 else : return 0
tell the training model when to stop .