【发布时间】:2019-02-08 14:28:04
【问题描述】:
我已经在 Google Cloud ML Engine 上部署了一个模型,但是当我尝试执行预测时(我正在使用 curl),我得到的结果是:
{"error": "Prediction failed: Error during model execution: AbortionError(code=StatusCode.INVALID_ARGUMENT, details=\"You must feed a value for placeholder tensor 'lstm_1/keras_learning_phase' with dtype bool\n\t [[Node: lstm_1/keras_learning_phase = Placeholder[dtype=DT_BOOL, shape=[], _device=\"/job:localhost/replica:0/task:0/device:CPU:0\"]()]]\")"}
我该如何设置这个占位符张量的值?它在json上吗?这是训练期间必须做的事情吗?正如许多建议所说,我尝试设置 K.set_learning_phase(0) 但没有用。
【问题讨论】:
标签: tensorflow machine-learning keras neural-network google-cloud-ml