Is it possible to create an optimizableVariable of integer type as an array with step different from 1?
이전 댓글 표시
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.
채택된 답변
추가 답변 (1개)
Walter Roberson
2021년 3월 6일
1 개 추천
Optimization variable 1 to 3 and multiply by 2 and add 6.
댓글 수: 3
Jon Gutiérrez Zaballa
2021년 3월 6일
Walter Roberson
2021년 3월 6일
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
2021년 3월 6일
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!