DeepOBS
develop

User Guide

  • Quick Start
    • Installation
    • Set-Up Data Sets
    • Contributing to DeepOBS
  • Simple Example
    • Create new Run Script
    • Run new Optimizer
    • Analyzing the Runs
  • Overview
    • Data Downloading
    • Data Loading
    • Model Loading
    • Runners
    • Baseline Results
    • Runtime Estimation
    • Visualization
  • Suggested Protocol
    • Decide for a Framework
    • Create new Run Script
    • (Possibly) Write Your Own Runner
    • Identify Tunable Hyperparameters
    • Decide for a Tuning Method
    • Specify the Tuning Domain
    • Bound the Tuning Resources
    • Report Stochasticity
    • Run on a Variety of Test Problems
    • Plot Results
    • Report Measures for Speed
  • How to Write Customized Runner
    • Decide for a Framework
    • Implement the Training Loop
    • Read in Hyperparameters and Training Parameters from the Command Line
    • Specify How the Hyperparameters and Training Parameters Should Be Added to the Run Name
  • Tuning Automation
    • Grid Search
    • Random Search
    • Bayesian Optimization (GP)

API Reference

  • Analyzer
    • Validate Output
    • Plot Optimizer Performances
    • Get the Best Runs
    • Plot Hyperparameter Sensitivity
    • Estimate Runtime
  • TensorFlow
    • Data Sets
      • 2D Data Set
      • Quadratic Data Set
      • MNIST Data Set
      • FMNIST Data Set
      • CIFAR-10 Data Set
      • CIFAR-100 Data Set
      • SVHN Data Set
      • ImageNet Data Set
      • Tolstoi Data Set
    • Test Problems
      • 2D Test Problems
        • 2D Beale
        • 2D Branin
        • 2D Rosenbrock
      • Quadratic Test Problems
        • Quadratic Deep
      • MNIST Test Problems
        • MNIST LogReg
        • MNIST MLP
        • MNIST 2c2d
        • MNIST VAE
      • Fashion-MNIST Test Problems
        • Fashion-MNIST LogReg
        • Fashion-MNIST MLP
        • Fashion-MNIST 2c2d
        • Fashion-MNIST VAE
      • CIFAR-10 Test Problems
        • CIFAR-10 3c3d
        • CIFAR-10 VGG16
        • CIFAR-10 VGG19
      • CIFAR-100 Test Problems
        • CIFAR-100 3c3d
        • CIFAR-100 VGG16
        • CIFAR-100 VGG19
        • CIFAR-100 All-CNN-C
        • CIFAR-100 WideResNet 40-4
      • SVHN Test Problems
        • SVHN 3c3d
        • SVHN WideResNet 16-4
      • ImageNet Test Problems
        • ImageNet VGG16
        • ImageNet VGG19
        • ImageNet Inception v3
      • Tolstoi Test Problems
        • Tolstoi Char RNN
    • Runner
      • TF Runner
      • Standard Runner
      • Learning Rate Schedule Runner
    • Config
  • PyTorch
    • Data Sets
      • Quadratic Data Set
      • MNIST Data Set
      • FMNIST Data Set
      • CIFAR-10 Data Set
      • CIFAR-100 Data Set
      • SVHN Data Set
      • Tolstoi Data Set
    • Test Problems
      • Quadratic Test Problems
        • Quadratic Deep
      • MNIST Test Problems
        • MNIST MLP
        • MNIST 2c2d
        • MNIST VAE
      • Fashion-MNIST Test Problems
        • Fashion-MNIST MLP
        • Fashion-MNIST 2c2d
        • Fashion-MNIST VAE
      • CIFAR-10 Test Problems
        • CIFAR-10 3c3d
      • CIFAR-100 Test Problems
        • CIFAR-100 3c3d
        • CIFAR-100 All-CNN-C
      • SVHN Test Problems
        • SVHN Wide Resnet
    • Runner
      • PT Runner
      • Standard Runner
      • Learning Rate Schedule Runner
    • Config
  • Tuner
    • Grid Search
    • Random Search
    • Gaussian Process
    • Tuner
    • Parallelized Tuner
    • Tuning Utilities
      • General Utilities
      • Bayesian Specific Utilities
  • Scripts
    • Prepare Data
      • Named Arguments
    • Download Baselines
      • Named Arguments
    • Plot Results
      • Positional Arguments
      • Named Arguments
  • Config
DeepOBS
  • Docs »
  • Tuner »
  • Grid Search
  • Edit on GitHub

Grid Search¶

class deepobs.tuner.GridSearch(optimizer_class, hyperparam_names, grid, ressources, runner)[source]¶

Bases: deepobs.tuner.tuner.ParallelizedTuner

A basic Grid Search tuner.

__init__(optimizer_class, hyperparam_names, grid, ressources, runner)[source]¶
Parameters:grid (dict) -- Holds the discrete values for each hyperparameter as lists.
generate_commands_script(testproblem, run_script, output_dir='./results', random_seed=42, generation_dir='./command_scripts', **kwargs)¶
Parameters:
  • testproblem (str) -- Testproblem for which to generate commands.
  • run_script (str) -- Name the run script that is used from the command line.
  • output_dir (str) -- The output path where the execution results are written to.
  • random_seed (int) -- The random seed for the tuning.
  • generation_dir (str) -- The path to the directory where the generated scripts are written to.
Returns:

The relative file path to the generated commands script.

Return type:

str

generate_commands_script_for_testset(testset, *args, **kwargs)¶

Generates command scripts for a whole testset. :param testset: A list of the testproblem strings. :type testset: list

tune(testproblem, output_dir='./results', random_seed=42, rerun_best_setting=False, **kwargs)¶

Tunes the optimizer on the test problem. :param testproblem: The test problem to tune the optimizer on. :type testproblem: str :param output_dir: The output directory for the results. :type output_dir: str :param random_seed: Random seed for the whole truning process. Every individual run is seeded by it. :type random_seed: int :param rerun_best_setting: Whether to automatically rerun the best setting with 10 different seeds. :type rerun_best_setting: bool

tune_on_testset(testset, *args, **kwargs)¶

Tunes the hyperparameter on a whole testset. :param testset: A list of testproblems. :type testset: list

Next Previous

© Copyright 2019, Frank Schneider Revision 95e226a1.

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