Filter löschen
Filter löschen

unable to control the optimization of some hyperparameters

2 Ansichten (letzte 30 Tage)
muhamed ibrahim
muhamed ibrahim am 1 Jun. 2022
Bearbeitet: muhamed ibrahim am 1 Jun. 2022
I'm trying to optimize the hyperparmeters (number of layers and number of nodes in each layer) for a Stacked auto encoder as follows:
optimVars = [optimizableVariable('numLayers',[1 3],'Type','integer') % number of layers
optimizableVariable('layer1_Size',[500 1000],'Type','integer') % number of nodes in the first layer
optimizableVariable('layer2_Size',[500 400],'Type','integer') % number of nodes in the 2nd layer
optimizableVariable('layer3_Size',[400 50],'Type','integer') % number of nodes in the 3rd layer
];
but this way I'm facing a problem which is for example: when the optimizer runs an iteration with numbLayers=1, the
optimzer will optimize the last two variables (layer2_Size & layer3_Size) which in such a case are not needed to optimize because
the only variable needs to be optimized in this case is "layer1_Size" . Is there any way to solve this problem by setting a variable on/off depending on another variable value?

Antworten (0)

Kategorien

Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by