Skip to content

Commit 09ff37d

Browse files
committed
Report more digits in error metric values
1 parent 9da1f51 commit 09ff37d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Pilot1/Uno/uno_baseline_keras2.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def evaluate_prediction(y_true, y_pred):
8282
def log_evaluation(metric_outputs, logger, description='Comparing y_true and y_pred:'):
8383
logger.info(description)
8484
for metric, value in metric_outputs.items():
85-
logger.info(' {}: {:.4f}'.format(metric, value))
85+
logger.info(' {}: {:.8f}'.format(metric, value))
8686

8787

8888
class LoggingCallback(Callback):
@@ -375,13 +375,19 @@ def warmup_scheduler(epoch):
375375

376376
ckpt.set_model(template_model)
377377
J = ckpt.restart(params)
378+
# J = candle.restart(params, model)
379+
378380
if J is not None:
379381
initial_epoch = J['epoch']
380382
best_metric_last = J['best_metric_last']
381383
params['ckpt_best_metric_last'] = best_metric_last
382384
print('initial_epoch: %i' % initial_epoch)
383385

384386
elif args.initial_weights is not None:
387+
# ckpt = candle.CandleCheckpointCallback(params,
388+
# verbose=True)
389+
390+
# if args.initial_weights:
385391
logger.info("Loading initial weights from '{}'"
386392
.format(args.initial_weights))
387393
start = time.time()
@@ -419,7 +425,7 @@ def warmup_scheduler(epoch):
419425
es_monitor = keras.callbacks.EarlyStopping(patience=patience,
420426
verbose=1)
421427

422-
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.5, patience=5, min_lr=0.00001)
428+
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.5, patience=100, min_lr=0.00001)
423429
warmup_lr = LearningRateScheduler(warmup_scheduler)
424430
# prefix + cv_ext + '.
425431
checkpointer = MultiGPUCheckpoint('model.h5', save_best_only=True)

0 commit comments

Comments
 (0)