【发布时间】:2018-09-24 00:19:23
【问题描述】:
在为 Google Cloud ML 定义超参数指标时,我可以使用 mean_squared_error,但如果我希望它比较验证集的准确性,我应该使用 val_mean_squared_error 吗?还是它自己做的?
这是示例 hptuning 配置:
trainingInput:
...
hyperparameters:
goal: MINIMIZE
hyperparameterMetricTag: ???mean_squared_error
这是合适的调用:
history = m.fit(train_x, train_y, epochs=epochs, batch_size=2048,
shuffle=False,
validation_data=(val_x, val_y),
verbose=verbose,
callbacks=callbacks)
由于我正在传递我的验证数据和 Keras,我怀疑是否应该使用 val_mean_squared_error。
【问题讨论】:
-
val_mean_squared_error不是 TF 的内置指标。如果您定义自己的仅在验证集上评估的指标,它应该可以工作。这是使用您的自定义指标和超参数调整的说明 (cloud.google.com/ml-engine/docs/tensorflow/…)。
标签: keras google-cloud-ml hyperparameters