#NEWLINE# def get_next_rate( self , current_error ) : #NEWLINE# #INDENT# diff_error = 0.0 #NEWLINE# diff_error = ( self . lowest_error - current_error ) #NEWLINE# if ( current_error < self . lowest_error ) : #NEWLINE# #INDENT# self . lowest_error = current_error #NEWLINE# #UNINDENT# if self . decay : #NEWLINE# #INDENT# if ( self . epoch >= ( self . decay_start_epoch + self . stop_after_deday_epoch ) ) : #NEWLINE# #INDENT# self . rate = 0.0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . rate *= self . scale_by #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . epoch >= self . decay_start_epoch ) : #NEWLINE# #INDENT# self . decay = True #NEWLINE# self . rate *= self . scale_by #NEWLINE# #UNINDENT# #UNINDENT# self . epoch += 1 #NEWLINE# return self . rate