Open Abrikosoff opened 6 days ago
Hi @Abrikosoff , thanks for your question. Are you sure you should be using a hierarchical search space? It seems like you shouldn't need a separate dropout per depth. If so this setup could be simplified. cc @esantorella
Hi Daniel, thanks for your remarks! I was able to construct the HSS for the NAS use case in the following way:
parameters = [
{
"name": "num_layers",
"type": "choice",
"values": ["two_layers", "three_layers", "four_layers", "five_layers",], # Specify the range of num_layers
"dependents": {
"two_layers": ["2_layer_hidden_size_0",
"2_layer_hidden_size_1",
"2_layer_activation_0",
"2_layer_activation_1",
"2_layer_dropout_0",
"2_layer_dropout_1",
"2_layer_lr",
"2_layer_momentum",],
"three_layers": ["3_layer_hidden_size_0",
"3_layer_hidden_size_1",
"3_layer_hidden_size_2",
"3_layer_activation_0",
"3_layer_activation_1",
"3_layer_activation_2",
"3_layer_dropout_0",
"3_layer_dropout_1",
"3_layer_dropout_2",
"3_layer_lr",
"3_layer_momentum",],
"four_layers": ["4_layer_hidden_size_0",
"4_layer_hidden_size_1",
"4_layer_hidden_size_2",
"4_layer_hidden_size_3",
"4_layer_activation_0",
"4_layer_activation_1",
"4_layer_activation_2",
"4_layer_activation_3",
"4_layer_dropout_0",
"4_layer_dropout_1",
"4_layer_dropout_2",
"4_layer_dropout_3",
"4_layer_lr",
"4_layer_momentum",],
"five_layers": ["5_layer_hidden_size_0",
"5_layer_hidden_size_1",
"5_layer_hidden_size_2",
"5_layer_hidden_size_3",
"5_layer_hidden_size_4",
"5_layer_activation_0",
"5_layer_activation_1",
"5_layer_activation_2",
"5_layer_activation_3",
"5_layer_activation_4",
"5_layer_dropout_0",
"5_layer_dropout_1",
"5_layer_dropout_2",
"5_layer_dropout_3",
"5_layer_dropout_4",
"5_layer_lr",
"5_layer_momentum",],
},
},
which I think keeps the spirit of the original question, but you are right, dropout could just be fixed; my original naive intention was to have a separate dropout for each hidden layer. I'll see if @esantorella has other comments about this question (especially about the discrete fidelity); if not I'll close it. Again, thanks a lot!
Hi Ax Team,
First of all thanks for all your help with my (8 and counting) questions so far! I now have another one :( I have two use (potential) use cases for hierarchical search spaces at the moment:
A NAS application, where in this case I have a parameter search space definition of the form:
ax_client.create_experiment( name="tune_cnn_on_mnist",
parameters=generate_parameters(num_layers=num_layers),
)
{ { "name": "x1", "type": "range", "bounds": [0.0, 1.0], "value_type": "float", # Optional, defaults to inference from type of "bounds". "log_scale": False, # Optional, defaults to False. }, { "name": "x2", "type": "range", "bounds": [0.0, 1.0], }, { "name": "x3", "type": "range", "bounds": [0.0, 1.0], }, { "name": "fidelity_marker", "type": "choice", "values": ["low", "medium", "high", "max"], "dependents": {"low": ["low_fidelity"], "medium": ["medium_fidelity"], "high": ["high_fidelity"], "max": ["max_fidelity"]}, }, { "name": "low_fidelity", "type": "fixed", "value": 0.0, "is_fidelity": True, "target_value": 1.0,
}, { "name": "medium_fidelity", "type": "fixed", "value": 0.5, "is_fidelity": True, "target_value": 1.0,
}, { "name": "high_fidelity", "type": "fixed", "value": 0.75, "is_fidelity": True, "target_value": 1.0,
}, { "name": "max_fidelity", "type": "fixed", "value": 1.0, "is_fidelity": True, "target_value": 1.0, } ],