Deep Inversion Validation Library

Contents:

  • dival.config module
  • dival.data module
  • dival.datasets package
  • dival.datasets.angle_subset_dataset module
  • dival.datasets.cached_dataset module
  • dival.datasets.dataset module
  • dival.datasets.ellipses_dataset module
  • dival.datasets.fbp_dataset module
  • dival.datasets.lodopab_dataset module
  • dival.datasets.reordered_dataset module
  • dival.datasets.standard module
  • dival.evaluation module
  • dival.hyper_param_search module
    • optimize_hyper_params()
  • dival.measure module
  • dival.reconstructors package
  • dival.reconstructors.dip_ct_reconstructor module
  • dival.reconstructors.fbpunet_reconstructor module
  • dival.reconstructors.iradonmap_reconstructor module
  • dival.reconstructors.learnedgd_reconstructor module
  • dival.reconstructors.learnedpd_reconstructor module
  • dival.reconstructors.networks package
  • dival.reconstructors.networks.iradonmap module
  • dival.reconstructors.networks.iterative module
  • dival.reconstructors.networks.unet module
  • dival.reconstructors.odl_reconstructors module
  • dival.reconstructors.reconstructor module
  • dival.reconstructors.regression_reconstructors module
  • dival.reconstructors.standard_learned_reconstructor module
  • dival.reconstructors.tvadam_ct_reconstructor module
  • dival.reference_reconstructors module
  • dival.util package
  • dival.util.constants module
  • dival.util.download module
  • dival.util.input module
  • dival.util.odl_noise_random_state module
  • dival.util.odl_utility module
  • dival.util.plot module
  • dival.util.std_out_err_redirect_tqdm module
  • dival.util.torch_losses module
  • dival.util.torch_utility module
  • dival.util.zenodo_download module
  • dival.version module
Deep Inversion Validation Library
  • dival.hyper_param_search module
  • View page source

dival.hyper_param_search module

Optimization of hyper parameters.

Both grid search and random search using the hyperopt library are supported.

The hyper parameter specification of a reconstructor class, optionally including default options for optimization, are specified in the class attribute HYPER_PARAMS.

dival.hyper_param_search.optimize_hyper_params(reconstructor, validation_data, measure, dataset=None, HYPER_PARAMS_override=None, hyperopt_max_evals=1000, hyperopt_max_evals_retrain=1000, hyperopt_rstate=None, show_progressbar=True, tqdm_file=None)[source]

Optimize hyper parameters of a reconstructor.

Parameters:
  • reconstructor (Reconstructor) – The reconstructor.

  • validation_data (DataPairs) – The test data on which the performance is measured.

  • measure (Measure or str) – The measure to use as the objective. The sign is chosen automatically depending on the measures measure_type.

  • dataset (Dataset, optional) – The dataset used for training reconstructor if it is a LearnedReconstructor.

  • HYPER_PARAMS_override (dict, optional) – Hyper parameter specification overriding the defaults in type(reconstructor).HYPER_PARAMS. The structure of this dict is the same as the structure of Reconstructor.HYPER_PARAMS, except that all fields are optional. Here, each value of a dict for one parameter is treated as an entity, i.e. specifying the dict HYPER_PARAMS[...]['grid_search_options'] overrides the whole dict, not only the specified keys in it.

  • hyperopt_max_evals (int, optional) – Number of evaluations for different combinations of the parameters that are optimized by hyperopt and that do not require retraining. Should be chosen depending on the complexity of dependence and the number of such parameters.

  • hyperopt_max_evals_retrain (int, optional) – Number of evaluations for different combinations of the parameters that are optimized by hyperopt and that require retraining. Should be chosen depending on the complexity of dependence and the number of such parameters.

  • hyperopt_rstate (np.random.RandomState, optional) – Random state for the random searches performed by hyperopt.

  • show_progressbar (bool, optional) – Whether to show a progress bar for the optimization. Default: True.

  • tqdm_file (file-like object) – File/stream to pass to tqdm.

Previous Next

© Copyright 2020, Johannes Leuschner, Maximilian Schmidt, Daniel Otero Baguer, David Erzmann.

Built with Sphinx using a theme provided by Read the Docs.