From 4649ea2ab447584489d988b4c6ee462ff9b2b104 Mon Sep 17 00:00:00 2001 From: Sam Freesun Friedman Date: Tue, 2 Jan 2024 12:16:47 -0500 Subject: [PATCH] setup.py --- ml4h/models/legacy_models.py | 2 +- ml4h/recipes.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ml4h/models/legacy_models.py b/ml4h/models/legacy_models.py index aa847191c..0ba07c5e6 100755 --- a/ml4h/models/legacy_models.py +++ b/ml4h/models/legacy_models.py @@ -350,7 +350,7 @@ def make_hidden_layer_model(parent_model: Model, tensor_maps_in: List[TensorMap] dummy_input = {tm.input_name(): np.zeros((1,) + parent_model.get_layer(tm.input_name()).input_shape[0][1:]) for tm in tensor_maps_in} intermediate_layer_model = Model(inputs=parent_inputs, outputs=target_layer.output) # If we do not predict here then the graph is disconnected, I do not know why?! - intermediate_layer_model.predict(dummy_input) + intermediate_layer_model.predict(dummy_input, verbose=0) return intermediate_layer_model diff --git a/ml4h/recipes.py b/ml4h/recipes.py index 6d3528e08..91341a319 100755 --- a/ml4h/recipes.py +++ b/ml4h/recipes.py @@ -909,6 +909,9 @@ def _predict_scalars_and_evaluate_from_generator( if tm_output_name in scalar_predictions: scalar_predictions[tm_output_name].extend(np.copy(y)) + if i % 100 == 0: + logging.info(f'Processed {i} batches, {len(test_paths)} tensors.') + performance_metrics = {} scatters = [] rocs = []