Is it possible to create an optimizableVariable of integer type as an array with step different from 1?
Mostrar comentarios más antiguos
Hello everyone!
I'm trying to perform a Bayesian optimization to find the best hyperparameters for a deep neural network and I want the variable MiniBatchSize to just have, in this case, three possible values: 8, 10, 12. I thought I could declare optVar as if it was an array
interval = 8:2:12;
optVar = optimizableVariable('MiniBatchSize', interval, 'Type', 'integer');
This code raises the following error:
Error using optimizableVariable/checkRange
'Range' value must be a string array, a cell array of character vectors, or a numeric vector of length 2.
Am I missing something? Is there another way to perform this?
Thanks in advance.
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 6 de Mzo. de 2021
1 voto
Optimization variable 1 to 3 and multiply by 2 and add 6.
3 comentarios
Jon Gutiérrez Zaballa
el 6 de Mzo. de 2021
Walter Roberson
el 6 de Mzo. de 2021
Ah, sorry, I didn't realize that the Stats toolbox had its own kind of variable creation; the instructions I gave were for Problem-Based Optimization
Jon Gutiérrez Zaballa
el 6 de Mzo. de 2021
Categorías
Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!