在Google云机器学习上部署重新训练的初始模型 [英] Deploy Retrained inception model on Google cloud machine learning
问题描述
我设法按照步骤进行操作,将其部署到Google云机器上.
I manage to retrain my specific classification model using the generic inception model following this tutorial. I would like now to deploy it on the google cloud machine learning following this steps.
我已经设法将其导出为MetaGraph,但无法获得正确的输入和输出.
I already managed to export it as MetaGraph but I can't manage to get the proper inputs and outputs.
在本地使用它,我进入图形的入口点是DecodeJpeg/contents:0
,它以二进制格式提供了jpeg图像.输出是我的预测.
Using it locally, my entry point to the graph is DecodeJpeg/contents:0
which is fed with a jpeg image in binary format. The output are my predictions.
我在本地使用的代码(正在运行)是:
The code I use locally (which is working) is:
softmax_tensor = sess.graph.get_tensor_by_name('final_result:0')
predictions = sess.run(softmax_tensor,{'DecodeJpeg/contents:0': image_data})
输入张量应该是DecodeJpeg
吗?如果我想输入base64 image
,我需要做些什么更改?
Should the input tensor be DecodeJpeg
? What would be the changes I need to make if I would like to have a base64 image
as input ?
我将输出定义为:
outputs = {'prediction':softmax_tensor.name}
我们非常感谢您的帮助.
Any help is highly appreciated.
推荐答案
我们现在发布了有关如何重新训练Inception模型的教程,包括有关如何在CloudML服务上部署模型的说明.
We've now released a tutorial on how to retrain the Inception model, including instructions for how to deploy the model on the CloudML service.