有人介意向我展示如何为tf.estimator.Estimator应用超参数调整的示例吗?
此处的代码简要概述:
def myModel(features, labels, mode, params):
### --- here follows my model --- ###
然后
Classifier = tf.estimator.Estimator(model_fn=myModel, **params)
如何调整分类器的超参数?
我尝试如下使用skopt:
search_space=[**params]
best_hyperparams = gp_minimize(
func=dnnClassifier,
dimension=search_space,
acq_func='EI',
n_cals=10,
verbose=True
)
我对此理解是否正确?
谢谢!