Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

Commit

Permalink
make experiment.test return the first generator item
Browse files Browse the repository at this point in the history
  • Loading branch information
justusschock committed Jun 3, 2019
1 parent b510ffb commit 13d3adb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions delira/training/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,9 @@ def test(self, network, test_data: BaseDataManager,
convert_batch_to_npy_fn=convert_fn,
prepare_batch_fn=prepare_batch, **kwargs)

return predictor.predict_data_mgr(test_data, 1, metrics,
metric_keys, verbose)
# return first item of generator
return next(predictor.predict_data_mgr(test_data, 1, metrics,
metric_keys, verbose))

def kfold(self, data: BaseDataManager, metrics: dict, num_epochs=None,
num_splits=None, shuffle=False, random_seed=None,
Expand Down

0 comments on commit 13d3adb

Please sign in to comment.