문제 설명
정수 스칼라 배열만 Hyperopt에서 스칼라 인덱스 오류로 변환될 수 있습니다. (only integer scalar arrays can be converted to a scalar index error in Hyperopt)
Hyperopt 라이브러리를 사용하여 매개변수 세트를 최적화하려고 합니다. 이 튜토리얼에 따라 코드를 구현했습니다. max_evals를 30회 미만으로 설정하면 모든 것이 잘 작동합니다. max_evals를 30으로 설정하면 20번째 반복에서 다음과 같은 오류가 발생합니다.
Traceback(최근 호출 마지막): File "/Users/sulekahelmini/Documents/ fyp/fyp_work/MLscripts/Optimizehyperopt.py", 149행, 시도 중=시험) 파일 "
참조 솔루션
방법 1:
I have the same problem as you. For my case, it also happens at the 20th iteration. I later found out that it's because, starting from that iteration, a new combination of input variables has been selected and one of these variables is not a simple number. It could be a 1 value array or list. So please check your input variables. Once that's changed, it will work.
참조 문서