def generate_CNN_hyperparameter_set(min_layers=1, max_layers=10, min_filters=10, max_filters=100, min_fc_nodes=10, max_fc_nodes=2000, low_lr=1, high_lr=4, low_reg=1, high_reg=4):
    ' Generate a hyperparameter set that define a CNN model.\n\n    Parameters\n    ----------\n    min_layers : int\n        minimum of Conv layers\n    max_layers : int\n        maximum of Conv layers\n    min_filters : int\n        minimum number of filters per Conv layer\n    max_filters : int\n        maximum number of filters per Conv layer\n    min_fc_nodes : int\n        minimum number of hidden nodes per Dense layer\n    max_fc_nodes : int\n        maximum number of hidden nodes per Dense layer\n    low_lr : float\n        minimum of log range for learning rate: learning rate is sampled\n        between `10**(-low_reg)` and `10**(-high_reg)`\n    high_lr : float\n        maximum  of log range for learning rate: learning rate is sampled\n        between `10**(-low_reg)` and `10**(-high_reg)`\n    low_reg : float\n        minimum  of log range for regularization rate: regularization rate is\n        sampled between `10**(-low_reg)` and `10**(-high_reg)`\n    high_reg : float\n        maximum  of log range for regularization rate: regularization rate is\n        sampled between `10**(-low_reg)` and `10**(-high_reg)`\n\n    Returns\n    ----------\n    hyperparameters : dict\n        parameters for a CNN model\n    '
    hyperparameters = generate_base_hyper_parameter_set(low_lr, high_lr, low_reg, high_reg)
    number_of_layers = np.random.randint(min_layers, (max_layers + 1))
    hyperparameters['filters'] = np.random.randint(min_filters, (max_filters + 1), number_of_layers)
    hyperparameters['fc_hidden_nodes'] = np.random.randint(min_fc_nodes, (max_fc_nodes + 1))
    return hyperparameters
Generate a hyperparameter set that define a CNN model.

Parameters
----------
min_layers : int
    minimum of Conv layers
max_layers : int
    maximum of Conv layers
min_filters : int
    minimum number of filters per Conv layer
max_filters : int
    maximum number of filters per Conv layer
min_fc_nodes : int
    minimum number of hidden nodes per Dense layer
max_fc_nodes : int
    maximum number of hidden nodes per Dense layer
low_lr : float
    minimum of log range for learning rate: learning rate is sampled
    between `10**(-low_reg)` and `10**(-high_reg)`
high_lr : float
    maximum  of log range for learning rate: learning rate is sampled
    between `10**(-low_reg)` and `10**(-high_reg)`
low_reg : float
    minimum  of log range for regularization rate: regularization rate is
    sampled between `10**(-low_reg)` and `10**(-high_reg)`
high_reg : float
    maximum  of log range for regularization rate: regularization rate is
    sampled between `10**(-low_reg)` and `10**(-high_reg)`

Returns
----------
hyperparameters : dict
    parameters for a CNN model
def generate_CNN_hyperparameter_set(min_layers=1, max_layers=10, min_filters=10, max_filters=100, min_fc_nodes=10, max_fc_nodes=2000, low_lr=1, high_lr=4, low_reg=1, high_reg=4):
    ' Generate a hyperparameter set that define a CNN model.\n\n    Parameters\n    ----------\n    min_layers : int\n        minimum of Conv layers\n    max_layers : int\n        maximum of Conv layers\n    min_filters : int\n        minimum number of filters per Conv layer\n    max_filters : int\n        maximum number of filters per Conv layer\n    min_fc_nodes : int\n        minimum number of hidden nodes per Dense layer\n    max_fc_nodes : int\n        maximum number of hidden nodes per Dense layer\n    low_lr : float\n        minimum of log range for learning rate: learning rate is sampled\n        between `10**(-low_reg)` and `10**(-high_reg)`\n    high_lr : float\n        maximum  of log range for learning rate: learning rate is sampled\n        between `10**(-low_reg)` and `10**(-high_reg)`\n    low_reg : float\n        minimum  of log range for regularization rate: regularization rate is\n        sampled between `10**(-low_reg)` and `10**(-high_reg)`\n    high_reg : float\n        maximum  of log range for regularization rate: regularization rate is\n        sampled between `10**(-low_reg)` and `10**(-high_reg)`\n\n    Returns\n    ----------\n    hyperparameters : dict\n        parameters for a CNN model\n    '
    hyperparameters = generate_base_hyper_parameter_set(low_lr, high_lr, low_reg, high_reg)
    number_of_layers = np.random.randint(min_layers, (max_layers + 1))
    hyperparameters['filters'] = np.random.randint(min_filters, (max_filters + 1), number_of_layers)
    hyperparameters['fc_hidden_nodes'] = np.random.randint(min_fc_nodes, (max_fc_nodes + 1))
    return hyperparameters