python-3.x - 如何在 Ray Tune 中定义与搜索算法无关的高维搜索空间?

标签 python-3.x hyperparameters ray ray-tune

我有两个关于 Ray Tune 的问题.首先,我如何独立于所使用的特定 SearchAlgorithm 定义超参数搜索空间。例如,HyperOpt 使用类似 'height': hp.uniform('height', -100, 100) 而 BayesOpt 使用类似 'width': (0, 20);是否有一些通用接口(interface)或 API?

其次,我希望能够使用 shape 参数定义一个超参数搜索空间,类似于定义一个 numpy 数组。我想要像 'heights': hp.uniform('height', -100, 100, shape=(10,)) 这样的东西。有办法做到这一点吗?

最佳答案

is there some generic interface or API?

不幸的是,Tune 中没有用于超参数空间的通用接口(interface)。这在一定程度上是因为很难以交叉兼容的方式完整地捕捉每种特定“语言”。

Second, I would like to be able to define a hyperparameter search space using a shape argument, akin to defining a numpy array. I would like something like 'heights': hp.uniform('height', -100, 100, shape=(10,)). Is there a way to do this?

快速查看 hyperopt 代码看起来像 this might be what you're looking for .

 def uniform(low, high, rng=None, size=())

希望对您有所帮助!

关于python-3.x - 如何在 Ray Tune 中定义与搜索算法无关的高维搜索空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54933142/

相关文章:

python - 值错误 : cannot reindex from a duplicate axis when assigning new column to pandas DataFrame

python-3.x - 当我想要出现索引时如何使用 numpy.hist

python - 导入错误 : No module named 'html.parser' ; 'html' is not a package (python3)

python - 贝叶斯优化可能不适用于 CNN 的原因有哪些

amazon-web-services - AWS SageMaker RL 与 ray : ray. tune.error.TuneError:未指定可训练项

python - 在Python中使用Ray并行化任务,得到 "Aborted (core dumped)"

python - NameError : name 'hasattr' is not defined - Python3. 6, Django1.11, Ubuntu16-17, Apache2.4, mod_wsgi

python - Tensorflow 中的超参数优化

tensorflow - 使用 super 引擎对 Tensorflow 进行超参数调整

python-3.x - 射线标准输出去了哪里?