Deploy Retrained inception model on Google cloud machine learning

后端 未结 2 1836
北海茫月
北海茫月 2021-01-20 12:06

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 lea

相关标签:
2条回答
  • 2021-01-20 12:16

    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.

    https://cloud.google.com/blog/big-data/2016/12/how-to-train-and-classify-images-using-google-cloud-machine-learning-and-cloud-dataflow

    0 讨论(0)
  • 2021-01-20 12:22

    In your example, the input tensor is 'DecodeJpeg/contents:0', so you would have something like:

    inputs = {'image': 'DecodeJpeg/contents:0')
    outputs = {'prediction': 'final_result:0')
    

    (Be sure to follow all of the instructions for preparing a model).

    The model directory you intend to export should have files such as:

    gs://my_bucket/path/to/model/export.meta
    gs://my_bucket/path/to/model/checkpoint*
    

    When you deploy your model, be sure to set gs://my_bucket/path/to/model as the deployment_uri.

    To send an image to the service, as you suggest, you will need to base64 encode the image bytes. The body of your request should look like the following (note the 'tag', 'b64', indicating the data is base-64 encoded):

    {'instances': [{'b64': base64.b64encode(image)}]}
    
    0 讨论(0)
提交回复
热议问题