Commit c0371b3c authored by Florian RICHOUX's avatar Florian RICHOUX

Verbose for callbacks


Former-commit-id: 186060a3
parent 4e504dbc
......@@ -188,18 +188,20 @@ if __name__ == '__main__':
val_p1, val_p2, val_labels = dl.load_data( validation_set )
if test_set:
callbacks_list = [ callbacks.ReduceLROnPlateau( monitor='loss', factor=0.3, patience=5 ) ]
callbacks_list.append( callbacks.EarlyStopping(monitor='acc', patience=patience,) )
#callbacks_list = []
callbacks_list = [ callbacks.ReduceLROnPlateau( monitor='loss', factor=0.5, patience=5, min_lr=0.0003, cooldown=1, verbose=1 ) ]
callbacks_list.append( callbacks.EarlyStopping(monitor='acc', patience=patience, verbose=1 ) )
if save_weights:
callbacks_list.append( callbacks.ModelCheckpoint( filepath='weights/' + file_name + '.h5',
monitor='loss', save_best_only=True,) )
monitor='loss', save_best_only=True, verbose=1) )
else:
callbacks_list = [ callbacks.ReduceLROnPlateau( monitor='val_loss', factor=0.3, patience=5 ) ]
callbacks_list.append( callbacks.EarlyStopping(monitor='val_acc', patience=patience,) )
#callbacks_list = []
callbacks_list = [ callbacks.ReduceLROnPlateau( monitor='val_loss', factor=0.5, patience=5, min_lr=0.0003, cooldown=1, verbose=1 ) ]
callbacks_list.append( callbacks.EarlyStopping(monitor='val_acc', patience=patience, verbose=1) )
#callbacks_list = [ callbacks.EarlyStopping(monitor='val_loss', patience=patience,) ]
if save_weights:
callbacks_list.append( callbacks.ModelCheckpoint( filepath='weights/' + file_name + '.h5',
monitor='val_loss', save_best_only=True,) )
monitor='val_loss', save_best_only=True, verbose=1) )
else:
val_p1, val_p2, val_labels = None, None, None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment