使用以下API资源管理器和身体,我会得到错误{"错误":"错误加载模型"}。我将开始使用https://developers.google.com/resources/api-libraries/documentation/ml/v1beta1/python/python/latest/ml_v1beta1.projects.projects.html#predict,但首先要验证所有内容。
有没有办法查看实际错误?
https://developers.google.com/apis-explorer/?authuser=1#p/ml/v1beta1/ml.projects.prodects.predict?
发布https://ml.googleapis.com/v1beta1/projects/{project}/models/{model_name}/versions/v1/v1:predict?
{ " httpbody":{ " data":" [{{"占位符" ":[44、158、178、156、111、101、110、110、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0,00、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0,0,00、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0、0],"键":1}]" }}
200
缓存控制:私人内容编码:GZIP内容长度:53内容类型:text/html;charset = UTF-8日期:2017年2月22日星期三05:25:14 GMT服务器:ESF变化:原点,X-Origin,参考
{"错误":"错误加载模型"}`
我添加了export。
这是基于文档https://cloud.google.com/ml/docs/concepts/deployment-overview#deployment_location。
的错误猜测。因此,看起来您只需要saver.save(sess, os.path.join(FLAGS.model_dir, 'export'))