Skip to content

Commit

Permalink
setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidtronix committed Jan 2, 2024
1 parent 98a2678 commit 4649ea2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ml4h/models/legacy_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 3 additions & 0 deletions ml4h/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit 4649ea2

Please sign in to comment.