我有两个关于 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/